Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a webpage which has a link to a PDF file. Every time I update the PDF file, Internet Explorer will not load the updated file; it keeps showing the old file, even if I refresh the page. At this time, the only way it will show the updated file is for me to change the file name (of the PDF file), but that is troublesome since I update this PDF file often.

Does anyone know what to do?

share|improve this question
You could try changing your URL to foo.pdf?revDate=20130916 – dcaswell Sep 16 '13 at 14:15
@dcaswell, you mean add foo.pdf?.... At the end of the URL containing the file? Can you be more specific? thank you. – user31266 Oct 7 '13 at 23:16
up vote 2 down vote accepted

If you change the parameter on the end of a URL, browsers will "know" not to cache the result.

Rather than change the name of the PDF you can just add a parameter onto the end of the URL that references it.

First: foo.pdf?revDate=20130916 and then foo.pdf?revDate=20131007 etc.

share|improve this answer
Thank you. It works!! – user31266 Nov 30 '13 at 23:06

If you've got some kind of control over said site you should indicate the file is not to be cached by stating so in the headers. The basic headers (in pseudo, for HTML/1.1) you'd need would be:

Pragma: no-cache
Cache-Control: no-cache, must-revalidate
Expires: {current_time}

For more info on the first two headers look at RFC2616 14.32 Pragma and 14.9 Cache-Control. Info on the Expires header as well as the format of the time with which to replace {current_time} can be found in chapter 14.21 Expires of that same specification.

FYI: Setting these headers will - of course - not force an already cached file (in your case: a previously viewed one) to be reloaded without you forcing it to do so (e.g. by emptying your cache).

share|improve this answer

Internet Explorer Caches the file and it doesnt delete it in the normal Delete Browsing History. You have to go to the Browser History Settings -> View Files locate the file and delete it manually.

However I found this to work on IE. Modifying the htaccess.

<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

<FilesMatch ".(pdf)$">
  Header set Cache-Control "max-age=0"

share|improve this answer

Internet Explorer has already downloaded the file, so telling it to download it again only results in opening the file already downloaded. You can check where Internet Explorer is downloading the file to and delete it before downloading and opening a new version of the file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.