Are .min.js / .min.css files loaded / parsed differently?

768 Views Asked by At

I've minified all of my Js and Css scripts and stylesheets, respectively, but deployed them on my site as .js and .css files, respectively. A colleague now told me that it's better to store their names using the .min prefix, as this will be processed differently by the browser, and for example Google will improve the ranking of your page, as it will assume faster page load times.

I cannot find anything online is this sense; so I wanted to ask here: Is this actually true?

2

There are 2 best solutions below

2
Josh Ackland On BEST ANSWER

.min.js is a standard used for "minified" versions of a JavaScript file.

Google doesn't cares about whether the file itself contains ".min.js" but creating a minified version of the script greatly reduces the size of the file which then reduces the bandwidth required to load the page. This is what Google cares about for its rankings.

0
Du-Lacoste On

Google will not parse differently if the minified version is used. But using minified will have advantages on your application.

  • It will drastically reduce loading times and bandwidth usage on your website.
  • It also improves site speed and accessibility, directly translating into a better user experience.

For example:

jquery.min.js: this is the minified version of jQuery. I.e. .min.js

jquery.js: this is the regular version of jQuery.

Basically the functionality is exactly the same except the readability hence better use minified version in your PROD environment and keep regular version for debugging purposes.