FireFox caching problems during on channel subscription

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

FireFox caching problems during on channel subscription

Robert Krombholz
Hi everyone,

I am using the grails & jQuery plugin.
Somwhow - on every second page refresh - FireFox is not able to read the
response of my AtmosphereHandler (which is fired by
AtmosphereResource#suspend()) and by that it will not really be suspended.
Here is how I subscribe on the client side (note that streaming will be
used as I am running on Tomcat):

var subscribeChannel = function(channelString, callback) {
     //Closing all active requests if there are any
fallbackTransport:'streaming', dataType:'json'}

And here is my server-side code from the onRequest method / closure:
         ... < some application specific stuff here> ...
          //Setting content type
          //Setting proper cache headers
          event.response.addHeader("Cache-Control", "no-store")
          event.response.addHeader("Cache-Control", "no-cache")
          event.response.addHeader("Cache-Control", "must-revalidate");
          event.response.addHeader("Pragma", "no-cache");
          //For FireFox (see
          event.response.addHeader("Expires", "0")
          //Suspending the request - waiting for events

As you can see I've already experiented a bit with manually setting
cache headers (just noticed that the suspend methis will anyway
overwrite them).

Does anyone else already experienced this problem?
Is there maybe any kind of Filter that I should apply to my broadcaster
configuration (currently using no filter).