I found out that some websites use css tag like style.css?ver=1. What is this?
style.css?ver=1
What is purpose of ?ver=1?
?ver=1
How do I do it in code?
To avoid caching of CSS. If the website updates their CSS they update the ver to a higher number, therefore browser is forced to get a new file and not use cached previous version. Otherwise a browser may get a new HTML code and old CSS and some elements of the website may look broken.
1.4m articles
1.4m replys
5 comments
57.0k users