CSS and JS with parameters (shaped like. css?v= with. js?v= or. css?version= and. js?version=)

Source: Internet
Author: User

1 <spanstyle= "FONT-SIZE:14PX;">css and JS with parameters (shaped like. css?v= with. js?v= or. css?version= and. js?version=)2 3 <Scripttype= "Text/javascript"src= "Jb51.js?version=1.2.6″></Script>4 <Linkrel= ' stylesheet 'href= ' base.css?version=2.3.3′type= ' Text/css '/>5 6 7 There are two possible ways to use parameters:8 9 Ten first, the script does not exist, but the server is dynamically generated, so with a version number, to show the difference. That is, the above code is equivalent to a file One <Scripttype= "Text/javascript"src= "Jb51.js"></Script> A <Linkrel= ' stylesheet 'href= ' Base.css 'type= ' Text/css '/> -  -  the but the browser will think that he is a version of the file!  -  -  - second, the client will cache these CSS or JS files, so each time you upgrade the JS or CSS files, change the version number, the client browser will re-download the new JS or CSS files, the role of the brush cache. We may sometimes find that the change of style or JS, the time of the refresh is not changed, that is, the client cache css or JS files, so plus the parameters are good!  +The second situation is the most, and it is possible that both exist simultaneously.</span>

CSS and JS with parameters (shaped like. css?v= with. js?v= or. css?version= and. js?version=)

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.