开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜