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: Can you specify how you include the [Revision]( 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]( 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 答疑

评论 抢沙发

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

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