Why Versioning css & js is important

Why Versioning css & js is important

Why Versioning css & js is important ?

Suppose you didn't version your style.css file and you upload it to the server, there are 100% chances that style.css will not load updated css and apply it to your page, because it's already cached by browser.

Versioning Avoids Bad Caching

This are files without versioning :

CSS

<link rel="stylesheet" type="text/css" href="style.css />

jQuery

<script type='text/javascript' src='script.js'></script>


Now check how to version them :

CSS

<link rel="stylesheet" type="text/css" href="style.css?ver=1.1/>

jQuery

<script type='text/javascript' src='script.js?ver=1.1'></script>

Read Complete Optimization Guide on Kindle :

#versioning #versioncontrol #websitetips #websiteoptimization #websiteoptimisation #webdesign #uidesigner #uiux #frontenddeveloper #frontendwebdeveloper #webdeveloper #webdevelopmenttutorial #codeblog #webdev #developerblog #websitetutorial #code #programing #html #css #caching

要查看或添加评论,请登录

omkar panherkar的更多文章

社区洞察

其他会员也浏览了