Normally, every code, distributed to be run on user machines, come with a license. If you do not agree with a license, you can't run a code. Moreover, license clearly states responsibility of the vendor, what uses are permitted, etc.

If you visit a site (f.e. law.stackexchange.com), it contains links to a code (javascript) to be automatically loaded and executed by user's computer in a browser.

What rules are governing those relations?

  1. Browser runs code automatically, and it's by design. Authors put a lot of efforts to make it 'automatically run'.
  2. User hasn't consented to any license before executing a code.

I see two options:

  1. Every user run code without a license, and is guilty of breaking copyright.
  2. There is an implicit permission to run a code (by the way it was implemented).

But if there is an 'implicit permission', where this permission ends? Can user download a code (it's already downloading it), save it (it's already saving it to the browser cache), and run in own environment (it's already running it)? And if so, can user do this (download-save-execute) in 'unexpected' environment? F.e. instead of browser with UI, execute it in own phantom.js or other 'headless' browser for own merits, outside of intentions of code authors?

How this situation is handled? Is it legal to execute a JS from publicly available site?

2 Answers 2


This question is somewhat answered here:

A commonly discussed scenario where implied licenses are destined to play a major role is on the World Wide Web. When a Web page is viewed in a Web browser, the page is downloaded through the Internet and placed on the user's screen. It is clear that a copy of the Web page is being made by the user. It is also clear that the Web page is protected against unauthorized copying by copyright law. But it would not make sense to allow the author of a Web page to sue a user who viewed her page, since the author intended that the page be viewed by others when she placed it on the World Wide Web. Rather, attorneys argue, courts should find that the Web page author has given end users an implied license to download and view the Web page. The extent of this implied license is unclear, and may someday be defined by the courts.

This article discusses the issue and includes discussion of case law, but your question is not answered, in the US, other than to say that there is an implied license. Field v. Google, Inc., 412 F.Supp. 2d 1106 seems to be most on-point: see the implied license section of the opinion, where the court granted Google access to an implied license defense because plaintiff failed to take the actions standardly taken to override an implied license. But the court did not draw bright lines as to what usage is (in general) implicitly licensed – that would depends on the surrounding customs of computer usage.

The basic logic of the implied license is that it would make no sense for a person to put out a web page that executes code and not intend that the code be executed: it it does make sense that they didn't intend the code to be copied and redistributed. The line is somewhere between those two extremes (don't even execute, vs. complete permission).

  • The situation for content (text/pictures) is somewhat clear (it's like a banner on the building - it was placed to be read). But code is more tricky - user may use code (without redistributing it) for own benefits beyond author intentions. F.e. author may wants user to load page on each operation, and user run code for 1e12 data entries on local machine... Oct 7, 2020 at 9:53

Copyright restricts making copies, it does not restrict using copies you legally have

When I buy a book, I’m allowed to read it, put it on my bookshelf, take it off the bookshelf and put it on my coffee table, take it from there and lose it under the seat of my car etc. what I’m not allowed to do is copy it.

When I access a web page, I’m allowed to display it in a browser, execute any code that comes with it, read the code etc. what I’m not allowed to do is copy it.

  • How do you execute code without copying it to your computer (drive and memory)?
    – user6726
    Oct 6, 2020 at 20:58
  • @user6726 by putting it on a web page that you have access to the author has given you permission to do this
    – Dale M
    Oct 6, 2020 at 21:29
  • In the context of software, I can't make any sense of the claim that "it does not restrict using copies you legally have".
    – user6726
    Oct 7, 2020 at 0:18
  • @user6726 if I have a legal copy of Excel, I can use it as much or as little as I like. I can’t copy it.
    – Dale M
    Oct 7, 2020 at 0:33
  • When browser download code it creates copy in the memory. Moreover, if you press Ctrl-Shift-U it will present you one more copy. Some browsers use caching, e.g. saves files locally. If that file saved by browser, that's copy. Sorry, simple "don't copy" did not fit here. Nov 8, 2023 at 11:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .