سؤال

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

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top