Cross Domain Ajax and JSONP

Topics 

  • Same Origin Policy 
  • JSONP (JSON with Padding) 
  • Cross Origin Resource Sharing (CORS)

Same Origin Policy

What is Same Origin Policy? 

  • The same origin policy prevents a script loaded from one origin from accessing a document from another origin 
    • In other words, it does not allow cross-domain access 
  • JavaScript codes are considered from the same origin only if they are loaded from the sites that have the same 
    • protocol 
    • port 
    • host 
  • The same origin policy is imposed by browsers

 

You must have an active subscription to download PDF and Lab Zip of this course topic.Please click the "Subscribe" button or the "Login" button if you already have an account.