How can I make the browser see CSS and Javascript changes?

CSS and Javascript files don't change very often, so I want them to be cached by the web browser. But I also want the web browser to see changes made to these files without requiring the user to clear their browser cache. Also want a solution that works well with a version control system such as Subversion. --- > Some solutions I have seen involve adding a version number to the end of the file in the form of a query string. > Could use the SVN revision number to automate this for you: https://stackoverflow.com/questions/2308/aspnet-display-svn-revision-number Can you specify how you include the [Revision](http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html) variable of another file? That is in the HTML file I can include the Revision number in the URL to the CSS or Javascript file. In the [Subversion book](http://svnbook.red-bean.com) it says about Revision: "This keyword describes the last known revision in which this file changed in the repository". > Firefox also allows pressing CTRL+R to reload everything on a particular page. To clarify I am looking for solutions that don't require the user to do anything on their part.

以上就是How can I make the browser see CSS and Javascript changes?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏