josephg/ShareJS — Issue #69: WebKit javascript caching with with print stylesheets bug
Author: nullobject
Created: 2012-02-14 00:13:12+00:00
State: open

Yo,

I've just upgraded my app to the latest ShareJS which now includes BrowserChannel as its transport. Everything works nicely, except for one crazy-ass bug in WebKit.

If the HTML document which includes ShareJS also contains a print stylesheet then Safari/Chrome will cache all javascript forever!?! WTF?

To reproduce in the ShareJS demo, just pick one of the stylesheet tags and throw a `media="print"` on there and bam! Every time you refresh the page the JS will be cached for ever. No head request, it's just served straight out of the browser cache. This makes it a pain in the ass to do development without hacking your print stylesheets out.

For example:

Please contact me directly if you need help reproducing this condition.

Cheers,

Josh