I've look at this question and I must say that it does not fit my current problem(s) / interrogation.
Scenario:
After the user successfully login (via an Ajax call) they are redirected (document.location.href
) to /app where the basic HTML is sent along with CSS and JS file.
Problems:
I'm currently putting the version number on my minified javascript and css filenames like appname-2.3.3.js and added a querystring version number to make sure it gets refreshed on new version ex:
<script src="/js/app/appname-2.3.3-min.js?1207040740" language="javascript" type="text/javascript"></script>
When I push a new version, after a new login, even if the filename and the querystring numbers changes, the browser keep the last version cached. The user need to do a full page refresh CTRL+F5 to get the new static files.
Question:
a) What would be the best way of ensuring each new login user has the right version? My guess is that the /app HTML page is cache and maybe I would need to put a querystring value there when redirecting after the login. But that brings me to the problem that the javascript file that call the login method would have to be the "right" version etc, etc.
Should I indicate an HTTP header in my controller to tell the browser not to cache the /app page? Would that have the implication of having no static file cached from that page?
There is new update almost every week or so, caching is still required.
b) From your point of view, what would be a good user-experience way of alerting already logged-in user that a new version has been updated and that they should refresh their page. Is it something that is "acceptable" from a user's perceptive.
For reference, the app is built on ASP.NET MVC 3.
Thanks for your time / input