July 2017
Beginner to intermediate
340 pages
7h 43m
English
Allowing client-side JavaScript AJAX to perform cross-domains requests is a potential security risk. If the JS code that's executed in the client page for your domain tries to call another domain that you don't own, it could potentially run malicious JS code and harm your users.
That is why all browsers in the market have a Same-Origin Policy when an asynchronous call is made. They ensure that the request is made on the same domain.
Beyond security, it is also a good way to prevent someone from using your bandwidth for their web app. For instance, if you provide a few font files on your website, you might not want another website to use them on their page, and use your bandwidth without any control.
However, ...
Read now
Unlock full access