views:

15

answers:

1

I have a commercial web application and just found a great JavaScript library I'd like to use. This library is licensed under Apache v2.

How do I properly (and legally) use the library in my public web application?

Since I like to achieve as much performance as possible in my web application, can I do the following:

  1. Can I remove the copyright/license notice from the JavaScript library (to reduce the size of the JS file)?
  2. Can I modify the library for my commercial web application. Note, I'm not redistributing the libary, I simply want to rework the library a bit to fit my needs better.
  3. If I'm allow to do #2, do I have to include the Apache license notice in the JavaScript file?

UPDATE

I've read the license for Apache v2 and it's still unclear to me.

A: 

When you send the JavaScript from the library to the client, you are redistributing it.

This means that any proviso of the license that governs "redistribution in source form" applies to you. You must include the copyright notice. Quoting from the license:

  • You must give any other recipients of the Work or Derivative Works a copy of this License; and
  • You must cause any modified files to carry prominent notices stating that You changed the files; and
  • You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works

If it has a NOTICE file, you must also redistribute that.

I'm not a lawyer, but this seems pretty clear-cut: you distributed the source code to them, so you must include a copy of the license, note changes you made, and preserve the original copyright notices unmodified. You don't have to include a copy of the license with every source file (just one for the whole site), but you must leave the original copyright headers as they were (save for adding your own additional notice).

Borealid
Is that really redistributing the JavaScript library? To me, when the web browser downloads the JavaScript library, that is for USE with my web application. It's not redistribution for the user to use the library for however they see fit.
Sarah
@Sarah: It is absolutely redistribution. You had a copy of the source code; they take an action, and then they have a copy of the source code. You've distributed it. This is why licenses like the AGPL exist; there are tricky bits when the web comes into play.
Borealid
@Borealid, so does that mean, if I modify the code - that then anyone can then take my code, with is a derivative of the original, and use it. I don't want other people to use my modified (derivative) work.
Sarah
@Sarah: If you don't want people to be able to use your code, you need either a library with a true closed-source license, or a situation where distributions in binary form are allowed (and a license such as BSD which does not mandate source distribution). Open-source definitionally means that distributing the source includes the right to use that source. However, I'd urge you to really think about this: if someone else has gone to the work of giving away something you find useful, isn't it only fair that you give back your enhancements to it?
Borealid