Home > Web Front-end > JS Tutorial > body text

Explanation of the reason why js or css files are followed by parameters_javascript skills

WBOY
Release: 2016-05-16 18:37:03
Original
760 people have browsed it

We often encounter js and css files loaded in the page with parameters, such as:



There are two possibilities for using parameters,

the script does not exist, It is dynamically generated by the server, so a version number is included to show the difference.
The client will cache these css or js files, so every time after upgrading the js or css file and changing the version number, the client browser will re-download the new js or css file
The second case is the most common , or both may exist at the same time.
The version number can be a random number, or an incremental value, in the form of a large version or a small version, or written according to the generation time of the script. For example, 20080727182553 is accurate to the second when the script is generated, and 2.3 .3 is the method of large version and small version.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!