JS or css file behind the argument with the reason _javascript tips

Source: Internet
Author: User
Frequently encountered in the page in the download of JS and CSS files with parameters, such as:

<script type= "Text/javascript" src= "jb51.js?version=1.2.6" ></script><link rel= ' stylesheet ' href= ' base.css?version=2.3.3 ' type= ' text/css '/>
There are two possible uses of parameters,

The script does not exist, but it is dynamically generated by the server, so there is a version number to differentiate.
The client caches these CSS or JS files, so each time you upgrade the JS or CSS file, change the version number, the client browser will download the new JS or CSS files
The second is the most, and there may be two of them at the same time.

The version number, can be a random number, or it can be an incremented value, a large version of the version of the way, or according to the script generation time to write, such as 20080727182553 is accurate to generate script seconds, and 2.3.3 is a large version of the small version of the way.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.