Should license comments on CSS or Javascript files be maintained or not?

Asked

Viewed 147 times

8

This question arises when I finalize a mechanism to realize a Bundle of CSS and JS files with consequent cache. In many projects we all use mechanisms that allow reducing the size of CSS and JS files in our projects however a legal issue arises.

Being that to decrease the size of these files my algorithm also eliminates all comments, in libraries like jQuery among others in the comments is placed the "License Disclaimer" and either the "Copyright notice".

It will be a violation of rights to delete this type of comments having as main objective the reduction of the size of data to travel in requests?

1 answer

9


Always remembering that I’m not a lawyer, much less a licensing expert, so I’ll tell you about a developer’s practice.

It essentially depends on the license. If it forces you to keep it there, it would be a violation yes. Precisely why good minification tools allow to make exception to these comments.

If you put it somewhere on your site, you can probably get it out of these files without infringing the license. Again, you need to see the specificity of the license, but it’s a solution that I think applies almost universally. As long as it is not something hidden, that is disconnected from the use of the files, do not have some trick, I think it is even a way to make its use more evident.

Some people may interpret that it would be enough to be together on the server and not need to be delivered to the browser. I wouldn’t go down this road if I wanted to make sure you weren’t disrespecting the license requirement. But if you want to insist on this, I suggest you find an expert lawyer.

There is no consensus on this, but I see in my humble observation that most people think they need to keep the license in the minified file. If you don’t, the risk is yours.

Don’t like it? Change your library or don’t use one.

Recommended tools to preserve the license (read the documentation to see how to get the desired result):

  • My question is not whether I like it or not! I think that the answer must be within the scope of each licence, but I am not sure. As for the risk, of course, it’s who does it. Since this is a mechanism used as a professional for clients, these issues must be taken seriously.

  • Yes, of course, but you may or may not like having to leave the license. I have given you the only alternative in this case. In fact, if the license allows you to buy the right to take it out, you can do this, too, but almost nothing in this kind of library is dual Licensing. If you can live with that, fine, if you can’t, choose a library that doesn’t require it.

  • I understand... the problem is it’s an automatic mechanism so I can’t figure out what comment the license contains or not. I’m thinking of keeping the comments of all the "min.css" and everyone else the algorithm takes out...it’s not 100% but I think it does the job.

  • I edited it, see if it helps.

  • 1

    Great comment and great help to yours! That’s why the comment "*!" is used instead of the "*".... I thank you very much! this question and answer should be documentation! no doubt!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.