I am using MVC 3. I am opening new tab on button click and in new tab i open one view in which have on iFrame and iFrame load pdf file.

This is work fine but When i open again then it display old file instead of new file. File name is same but file content is changed.


If pdf file name generate random then its work fine but i don't want to do this.

  • 1
    Probably your server is caching the PDF. You can either indicate to your web server that you don't want to cache PDF files, or you can generate the PDF URL with a "random" parameter appended, like www.domain.com/url?ver=1234 If the value of the parameter is never the same, it won't be cached by the users browser. Apr 21, 2014 at 16:31
  • How to tell server don't caching pdf file? Apr 21, 2014 at 16:51

1 Answer 1


Your various options are:

  1. Disable browser cache for entire ASP.Net website
  2. Cache Busting on selective URLS
  3. Use a content delivery network that has better handling of expiration on static files
  4. Migrate from MVC to Apache or similar with .htaccess caching

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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