10

It is a simple doubt.

What is the difference between

http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.css

and

http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css

Anything wrong happen If i replace any of them with other, in a live site? if both were untouched(not edited previously)?

1

6 Answers 6

20

You can replace them interchangeably.

The regular one is meant for examination and (if necessary) editing. The minified version makes the file as small as possible by removing all the whitespace it can. This makes it load faster for users.

Sign up to request clarification or add additional context in comments.

2 Comments

Do you have the responsibility of minifying it yourself after you make some changes to the pretty version or the minifyed version gets generated automatically?
You would have to re-minify it (there are many free online tools that will do this for you).
6

The min version is minified, compressed. Functionally they should be identical. The minified version is smaller and downloads faster and should be used in production, but is unreadable and therefore bad during development.

Comments

0

The one with min simply means it's minified, the one without min is human readable.

To quote from Wikipedia:

Minification (also minimisation or minimization), in computer programming languages and especially JavaScript, is the process of removing all unnecessary characters from source code, without changing its functionality. These unnecessary characters usually include white space characters, new line characters, comments, and sometimes block delimiters, which are used to add readability to the code but are not required for it to execute.

The purpose of minifying code is obvious in web once you compare their sizes: removing unnecessary characters significantly reduces the size of the file that need to be transferred.

Comments

0

The min version is a minified version of the "cegular" CSS file. The end result is exactly the same (same styles are applied). The min version is just smaller, as unnecessary white-space and such are stripped from the file.

The reason for this is to save bandwith and speed up page load times as the browser has to download less stuff in order to render the page.

Comments

0

min means minified version of a cegular css file. The result will be the same, although the min will load faster. You should probably not delete the file if your website is very large, but if its a small website, you can probably delte it. -BurningPotato

Comments

0

By using minified version of files following advantages could be experienced.

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

Minification has become standard practice for page optimization.

All major JavaScript library developers (bootstrap, JQuery, AngularJS, etc.) provide minified versions of their files for production deployments, usually denoted with a min.js name extension.

In summary: developers tend to use spacing, comments and well-named variables to make code and markup readable for themselves. This is a plus in the development phase, it becomes a negative when it comes to serving your pages. When minified, comments and extra spaces will be removed saving up file size and reducing bandwidth of network.

Hence it is better to use minified version in your PROD environment.

You may have a look on this

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.