Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copyright information in minified javascript and css files

I think I may need to revisit this, out of curiousity if nothing else.

Is it allowed to remove the license information from minified js and css files if those files are generated with a sourcemap that points to the unminified source and all files (that have licenses) are available?

I ask because when I minify several files, I find that most of the size I cannot reduce comes from carrying over all the license information. I can see that, for the browser function and download, it may be possible to get away with just the smallest minified source, however that file would be used only by the browser to render. If the console is opened, the sourcemap would be downloaded to point the inquiring user to the unminified source and preserve the requirement of having the original license be intact and available upon request.

Specifically, the Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0), MIT license (http://en.wikipedia.org/wiki/MIT_License), and the GPLv2 (https://www.gnu.org/licenses/gpl-2.0.html) to start.

like image 262
RKichenama Avatar asked Nov 10 '22 16:11

RKichenama


1 Answers

As far as I know, a file should contain or refer to it’s license. Either way, I wouldn’t risk it. I wouldn’t worry about the comment though. They’re generally not that long.

like image 103
Tim S. Avatar answered Nov 14 '22 22:11

Tim S.