Do both these files have the same content? Or do they provide different functionality so we need to include both of them? I'm new to jQuery so would like to know. Thanks.
5 Answers
The contents are NOT same, but the functionality is same and You should include only one of them.
jquery-1.7.1.js -> This is the actual version of the script which will be used by developers. Ideal for development environment.
jquery-1.7.1.min.js -> This is the minified version of the actual script(something like compression) ideally used in QA/Production environment.
Read about minification and its benefits -> http://www.alistapart.com/articles/better-javascript-minification/
3 Comments
No. They are the exact same and you should only include one.
The .min ("minified") version is intended for production usage, as it is much smaller (the comments, whitespace, etc. have all been stripped out). The non-minified version is helpful for debugging but has a much bigger file size.
Comments
The .min version is a minified version of the one without the .min.
They do they same thing.
Comments
The one that ends with .min.js is the compressed version which uses less disk space, you should use that one.