PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, January 14, 2022

[FIXED] HTML5 Websockets Server Requirements

 January 14, 2022     apache, html, javascript, lamp, websocket     No comments   

Issue

I have spent the whole of yesterday trying to get my head round HTML5 websockets, but am still a little confused about a few points:

  1. Do I need to install any further add ons to my apache server to run a websocket server?
  2. Is it possible to run websockets on a shared server setup without access to the server root?
  3. Are websockets going to be supported by IE9, if not then is there any point working with them if there is such limited browser support? Should I look at polling techniques instead?
  4. How does one go about running simultaneous websockets (eg multiple chat app instances) how is each one uniquely defined?
  5. Is there a reliable fallback for browsers that don't support websockets?

Hope someone out there can help me understand these points, very greateful!

W.


Solution

Don't think of WebSockets as a web server plugin. WebSockets is a way to establish a (nearly) raw socket connection between a browser and something else. There is some desire on the standards committee to allow web servers to easily forward WebSocket connections to their target service, however as of v76 of the protocol the WebSockets handshake is explicitly incompatible with HTTP setup (for vague security reasons). This may change back in the future especially now that a serious security issue has been found in the v76 setup process.

Yes, the WebSockets handshake looks a lot like HTTP, so it's easy to get confused, but even when it was compatible with an HTTP Upgrade request, it was still just to enable easy forwarding by the web server, not so that the webserver could become a WebSockets server.

There is a recent security issue in WebSockets which probably means most browser makers will disable WebSockets until the next version of the protocol is ready, but apart from that WebSockets is pretty much universally support because browsers without native support can use web-socket-js which is a Flash based fallback. iOS 4.2 also has WebSockets support (although again, that may get disabled temporarily due to the security issue).

So the answers to your questions are: 1) Mu 2) Yes 3) Unlikely 4) Not defined by WebSockets 5) Yes: see web-socket-js



Answered By - kanaka
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing