what is style.css?ver=1 tag?

前端 未结 6 2001
温柔的废话
温柔的废话 2020-12-15 06:26

I found out that some websites use css tag like style.css?ver=1. What is this?

What is purpose of ?ver=1?

How do I do it in code?

6条回答
  •  再見小時候
    2020-12-15 06:37

    The purpose of the ?ver=1 is to parameterize the css file, so when they publish a new style.css file they up the version and it forces the client to download the new file, instead of pulling from the cached version.

提交回复
热议问题