I am using a library that is under the MIT license. I never used a library that I needed to include the license before, so I have no idea where to add them. I read that I should add them in my file, but the thing is my project is a site constituting of php files, is there a certain file that I need to add the license to or all the files? Also what should I add? The project came with a LICENSE.txt file and contains text. The project I am using is jsModal.


I am not a lawyer, but here are my recommendations.

The main requirement of the MIT license can be found on the jsModal license page

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

If your project is a website, you should state that you are using jsModal that it is licensed under the MIT license. You need to make the entire text of the jsModal license page (including the copyright information) available directly on your site. I do NOT think a simple hyperlink the the jsModal page is sufficient. The text must be a part of your web site. If the web site is the only place you are using jsModal, you do not need to add any licensing information to any other files. A single page stating you are using jsModal with the entire text of the MIT license is sufficient.

Edit: You should make sure that this license/copyright information is visible to the end user. Typical users won't look at your code comments, so code comments by themselves are not sufficient. You only need a single page for this license & copyright information. You don't need to add it to every page of your website.

  • so each page that uses this library I should include the license text? Do I add it as part of the site as in shown to the users or just a comment in each page that uses the library? Apr 26 '17 at 19:02
  • 1
    No, you don't need to have the license/copyright notice on each page. One page for your entire website is sufficient. You should add it as part of the site that is shown to the user. A typical user isn't going to read your code comments. I'll update my answer to include this new information.
    – airfishey
    Apr 26 '17 at 19:57
  • One more question, am I constrained to the file structure of the library or can I put the js and css files separately wherever I want? May 2 '17 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.