This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Avoid browser caching on the server side

 
Eric Juneau
Greenhorn
Posts: 28
  • 0
  • 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
  • 0
  • 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: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic