Refresh js and css every session
i want that a user make the login, the js and css are force to refresh themself
开发者_运维技巧How can i do?
Thanks
You mean you want to invalidate the cache for some script.js
or style.css
files?
You can add dummy GET parameter like this:
<link rel="stylesheet" href="style.css?needrefresh12345" />
Or if you log in users without page reload (Ajax) you can add that dummy argument to the src
and href
attributes with Javascript.
For forcefully refresh css, you can dynamically load css using jquery.
精彩评论