Varnish Cache and the support for HTML5 is akin to the movie titled The Cook, the Thief, His Wife & Her Lover. The intricate web of relationship based on misunderstanding and extra marital affairs can be somewhat compared the current state of websocket implementation in browsers, in backend servers, and ultimately, in Varnish Cache.
The Cook: Browsers
The Cook is the browsers. This is symbolic of the ways everyday users would access the Internet - via the browser. We rely on the the Cook to serve up just the right dish for us to enjoy a staple diet of HTML and HTTP traffic. However, the Cook resents the Thief. In fact, browsers have disabled certain HTML5 features by default due to security risks. The Cook is reluctant to change its recipe, but when changes do occur - say the recent draft-ietf-hybi-thewebsocketprotocol-10 update in Chrome and FF, some applications will break.
The Thief: HTML5
The Thief is a cunning frontrunner of web standard. HTML5 is both dangerous yet exciting. It is attractive, ruthless and appealing. It distrusts His Wife, yet it flaunts her. We love the Thief for what it promises.
His Wife: Websocket
The sophisticated, deeply troubled wife of the Thief - Websocket. She is beautiful and meticulously groomed yet under the surface, she has flaws - security flaws that even the most stout users of websocket will find unnerving. She finds solace in Her Lover, and it is Her Lover that supports her every step of the way.
Her Lover: Varnish Cache
Enter the quiet, unsung hero of the modern day web stack. A devout lover to the Thief’s Wife, and the solid rock in this tangled web of relationships. Varnish supports websocket, as is. We do not ask for her to change, nor do we need any new feature development to support her. As it is, Varnish is the perfect fit for websocket. As it is, websocket changes will be supported by Varnish throughout the evolution of websocket standards.
It is this confusing, complex and dynamic relationship between these four parties that makes websocket support such a mystique. Without further ado, if you want websocket support, do the following in Varnish.
I am just a messenger, hats off to Tollef Fog Heen.