Is this something restricted by cross-origin policy or not?
You can't. You could only sent requests to www.foo.com.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With