CSS and JS tape (.css? V = with. js? V =)
Copy codeThe Code is as follows:
<Script type = "text/javascript" src = "jb51.js? Version = 1.2.6 "> </script>
<Link rel = 'stylesheet 'hrefw.'base.css? Version = 2.3.3 'Type = 'text/css '/>
There are two possibilities for using parameters,
First, the script does not exist, but is dynamically generated by the server. Therefore, a version number is provided to indicate the difference. That is, the above Code is equivalent
Copy codeThe Code is as follows:
<Script type = "text/javascript" src = "jb51.js"> </script>
<Link rel = 'stylesheet 'href}'base.css 'type = 'text/css'/>
But the browser will think it is a version of this file!
2. The client caches these css or js files. Therefore, after each js or css file is upgraded, the client browser will re-download the new js or css file by changing the version number, the role of the cache. Sometimes you may find that you have modified the style or js, And the refresh time remains the same, that is, the client caches css or js files, so adding parameters is good!
The second case is the most, or both.
The version number can be a random number, an incremental value, a large version or a small version, or a script is written based on the script generation time. For example, 20080727182553 is accurate to the second when the script is generated, 2.3.3 is the method of using a major version or a minor version.