Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Avoid browser caching on the server side

 
Eric Juneau
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Browsers cache by URL -- if the URL changes, a cached resource with a the original URL cannot be served.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic