DevelJoe
DevelJoe

Reputation: 1312

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

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?

Upvotes: 1

Views: 1323

Answers (2)

Du-Lacoste
Du-Lacoste

Reputation: 12777

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.

Upvotes: 0

Josh Ackland
Josh Ackland

Reputation: 673

.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.

Upvotes: 4

Related Questions