I often see css files and js files in the source code of some website pages with a question mark followed by a series of numbers or characters. I have also used this method, and it is very easy to use?, it has two functions: 1. As a version number, it makes it easy for you to remember and search; 2. As a modification tab, let the browser download the new file again. In fact, the question mark after the CSS file does not play a practical role, it can only be used as a suffix, if you use the question mark plus parameter method, you can add the version number and other information, such as the one used on Sina and Facebook:
http://xxx.xxx.cn/css/common/index.css?version=20101126145707 http://tjs.sjs.xxx.cn//static/js/top.js?version=20101126145707 You can clearly see when the CSS file was modified after the version, and when the CSS file is modified and uploaded to the server, you can also let the browser download the CSS file again, solving the problem of not flushing the cache. It's clear when you talk about it, right? A small detail that can add a lot of convenience to us. |