5

Is this something restricted by cross-origin policy or not?

Uzair Farooq
  • 2,402
  • 3
  • 24
  • 37

2 Answers2

4

No. The page is the origin, not the script.

The page is on www.foo.com. The script is loaded from www.example.com. XHR requests can be made to www.foo.com but not www.example.com.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
4

You can't. You could only sent requests to www.foo.com.

xdazz
  • 158,678
  • 38
  • 247
  • 274