Technically, yes. In practice, I will probably wait.
Websockets are definitely the way HTML5 uses the type of connection we're used to. Technically, yes, you can, but depending on the type of site you are building, you may want to stop. Websockets is one of the new parts of the HTML5 specification and is still being finalized. It works in the latest versions of Chrome and Firefox 4, but IE9 hasn't implemented it yet, and there is no word about whether IE10 will have it. Technical sites that demonstrate the latest technology (for example, a demonstration of what is possible in HTML5), and any other things in which the vast majority of the audience will be guaranteed to use a supporting browser or early users, should be in order. If not, you can push some users away. Only you can decide where to go.
The key point here is that Websockets is currently a changing specification, and AJAX works in both old and new browsers. If you want to get backward compatibility in addition to the warranty, specifications and browsers will not change tomorrow and violate your existing code, use AJAX. If you're cool with a small chance that specifications and browsers might change in the future and don't care about people using older browsers, then use websites.
fooobar.com/questions/4796 / ... :
- Chrome 4.0 supports websites.
- Safari 5.0.2 also supports them.
- Firefox 4.0 comes with WebSockets support disabled. to view it, see
- Opera 11 comes with support disabled to enable it again, see
- IE9 does not support them, however the add-in offers experimental support
source share