http - Firefox not using cached copy of file after 304 -


i'm seeing behaviour in firefox seems me unexpected. not particularly repeatable (unfortunately) crop time time. once starts, repeatable on refreshing page until full refresh (ctrl-f5) done. last time, managed trace.

basically, ff4.0.1 requesting resource (from asp.net mvc 3 application running under iis7):

get http://www.notarealdomain.com/versionedcontent/scripts/1.0.40.5653/jquery.all.js http/1.1 host: www.notarealdomain.com user-agent: mozilla/5.0 (windows nt 6.1; wow64; rv:2.0.1) gecko/20100101 firefox/4.0.1 accept: */* accept-language: en-gb,en;q=0.5 accept-encoding: gzip, deflate accept-charset: iso-8859-1,utf-8;q=0.7,*;q=0.7 keep-alive: 115 proxy-connection: keep-alive referer: http://www.notarealdomain.com/gf if-modified-since: sat, 01 jan 2000 00:00:00 gmt 

it gets following response server (via proxy, can see in iis server logs request made way server):

http/1.1 304 not modified date: mon, 09 may 2011 14:00:47 gmt cache-control: public via: 1.1 corp-proxy (netcache netapp/6.0.3p2d5) 

this seems reasonable - client makes conditional request (if-modified-since), , server responds "ok - use copy" (304 not modified).

the problem client in case not dish file - behaves if there no content (ie if image, doesn't appear, if js behaves if .js file missing on page, if .css page renders without css styles, etc). apparent on both web page itself, , when using excellent httpwatch tool. httpwatch shows browser did have item in cache, didn't use content source.

what missing here? above conversation seems reasonable, why ff make conditional request , not use cached copy when told so? if ctrl-f5 force full refresh, behaviour goes away, , returns sporadically.

we have anecdotal evidence occurs ff3 , chrome too, haven't confirmed forensic data.

has else seen this, , know might going wrong, or further steps might isolate problem?

ok - got bottom of problem. ever - answer staring me in face!

the problem not caching behaviour @ all. part of system sporadically failing , writing out zero length file - being cached firefox.

so when firefox sent conditional request server , received it's 304/not modified, dutifully went off , used corrupt 0 length version of file found in cache.

all signs there me see - took bit of time there :)

thanks all, comments , suggestions.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -