Why adding version number to CSS file path?

前端 未结 6 1480
遇见更好的自我
遇见更好的自我 2020-11-29 02:06

I noticed some websites put the version numbers (especially) in the CSS file path. For example:



        
6条回答
  •  一个人的身影
    2020-11-29 03:08

    If you set caches to expire far in the future adding ?v=2 will let the server know this is a new file but you won't need to give it a unique name (saving you a global search and replace)

    HTM5 boilerplate also includes it in their project.

    Check this video also: HTML5 Boilerplate Walkthrough.

提交回复
热议问题