0

Basically, I need to remove the 'cache' part of request headers when requesting a particular static resource (a pdf).

Is this possible to achieve?

A bit more context:

I'm comparing two calls to a file (calls as in assigning the path of pdf to a src attribute of an iframe). One works, one doesn't. Using fiddler2 I've had a look at the traffic and it appears that the only difference is that the request headers of the request that doesn't work includes If-Modified-Since in the 'cache' part of it's headers. If I can remove this I think it'll solve the issues I'm having as I understand caching and iframes displaying pdfs can be potentially problematic. If I'm wrong, and it doesn't solve it, I'll at least have ruled that out as a problem.

EDIT: This is a problem exclusive to IE 8 if that's any help: https://stackoverflow.com/questions/13528332/pdf-freezing-browser-do-i-have-enough-information-to-isolate-the-cause

Community
  • 1
  • 1
  • 1
    Have you tried adding a random number to the end of the URL? e.g. thing.pdf?64563623 – Lee Taylor Nov 23 '12 at 12:33
  • Brilliant idea, thanks mate. I'll try it now... –  Nov 23 '12 at 12:36
  • You should not need to remove a cache header from the request. Better set up a proper cache header in the response – Bergi Nov 23 '12 at 12:38
  • I'm completely unfamiliar with headers to be honest. I'm not sure if I'm even barking up the right tree, but it's the only difference I can see. –  Nov 23 '12 at 12:39
  • Didn't work Lee, still the same issue - basically, it loads the pdf in the iframe and then the browser crashes. –  Nov 23 '12 at 12:42
  • I think whole issue should be discussed at [your original question](http://stackoverflow.com/questions/13528332/pdf-freezing-browser-do-i-have-enough-information-to-isolate-the-cause) – Bergi Nov 23 '12 at 12:52

1 Answers1

1

Like @Lee Taylor said, use a unique variable in your path. Mostly this is done with a timestamp since it's unique.

Kevin
  • 222
  • 1
  • 5