John Smith
John Smith

Reputation: 1

Web Application Updates: Caching old app

I've created a Grails web application and put it live for users to use. It makes use of caching + backbone tpl's etc.

The issue is, when I make changes to html/css and put the new version live: users can only see these updates if they clear their cache. How can I get it so I can force users to fetch a new copy when I make updates to these static files. I've thought of the following:

1 - Make http headers with expire set to midnight every night (so each day they fetch the static data again in the morning) - this would work nicely.

2 - Append a version to each static file I update.. for example main-v1-1.css and when I update this, change it to main-v1-2.css etc...

Any information would be handy, because currently when I push any slight html/css updates.. users are not seeing these new updates unless I get them to clear cache/refresh browser.

Upvotes: 0

Views: 72

Answers (1)

Alidad
Alidad

Reputation: 5538

Have you tried using cache-headers plugin? It can help you to control how the browser cache your contents here

Upvotes: 1

Related Questions