aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Avoid browser caching on the server side Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Avoid browser caching on the server side" Watch "Avoid browser caching on the server side" New topic
Author

Avoid browser caching on the server side

Eric Juneau
Greenhorn

Joined: Jul 13, 2009
Posts: 28
I want to update some static content (image files) within my ear without changing the code. I know I can just replace the files themselves, then deploy the static content up to production. However, I want the user to see these new images immediately. I'm afraid of them being cached. Is there any way I can guarantee that the user will see the new images? Will renaming them in the filename and jsp make them uncached?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Eric Juneau wrote: Will renaming them in the filename and jsp make them uncached?


Um, yes because it will be a different file.

Look at this thread: http://www.coderanch.com/t/122075/HTML-JavaScript/window-location-bypassing-cache#603509
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61221
    
  66

Browsers cache by URL -- if the URL changes, a cached resource with a the original URL cannot be served.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Avoid browser caching on the server side