Consequences of a policy of the same origin of JavaScript when loading images dynamically

If JavaScript has the same origin policy , does this mean that I cannot dynamically load images from another domain?

+3
source share
2 answers

No, the same origin policy does not apply to tags <img>.

There are other notable exceptions, some of which are described in this Wikipedia article. These include:

  • Style sheets
  • Scripts (this is how JSONP works)
  • Form submission
+5
source

Source: https://habr.com/ru/post/1776032/


All Articles