3 ms·
Comparing uncompressed but minified JavaScript to compressed JavaScript is not an honest comparison. Obviously the minified JavaScript would also be compressed
by PragmaticPulp 6y ago
Comparing uncompressed but minified JavaScript to compressed JavaScript is not an honest comparison. Obviously the minified JavaScript would also be compressed and smaller than the unminified JavaScript.
Most of the arguments in this short presentation feel disingenuous. Minified versions of most 3rd party libraries are provided directly by the open source maintainers, so minifying your own code and including their minified library isn't violating anything. Companies are under no obligation to provide their own proprietary source code in a readable format with variable names intact.
Somewhere between 99.99% and 100% of users would prefer the faster loading, more responsive site with minified code. I think the authors started with a conclusion they wanted and tried to walk backward until they found some arguments in favor of their conclusion.
- lucb1e 6y ago> Minified versions of most 3rd party libraries are provided directly by the open source maintainers, so minifying your own code and including their minified library isn't violating anything. Companies are under no obligation to provide their own proprietary source code in a readable format with variable names intact. You didn't understand what the speaker meant here. The point is (indeed) not that the license states that you must provide a readable format with variable names intact. You can use map files for that or just link the original where they can find the software for themselves. It's this link and notice that people can go out and use it for themselves, the license that you are required to include, that might be stripped by minification. If the authors provide a minified, unlicensed version themselves, then that is copyrighted and you're not allowed to use it. You don't have a license without a license, so if the minified version doesn't contain a license, then you can't use it. Likely, there is a separate file or page saying what the code is licensed as and that covers the minified version as well. But that doesn't give you a get out of jail free card: that separate license will (almost always) still say that you have to include a copyright notice somewhere. Perhaps not in the minified file itself, but then elsewhere on the site. For example, from the MIT license: > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
- tzs 6y ago> Comparing uncompressed but minified JavaScript to compressed JavaScript is not an honest comparison. Obviously the minified JavaScript would also be compressed and smaller than the unminified JavaScript. The video covered that.