Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  How to play with cross domain request

What is cross domain requestIn simple, cross domain request is to request resource from other domain in one domain. Note, the "other domain" doesn't just mean domain name only, it includes much more. If the protocol, domain name, port is not the same, two domains will be considered different. Below example describes what is considered as different domain.http://www.a.com/a.jshttp://www.a.com/b.js               # Same domainhttp://www.a.com/lab/a.js         # Same domainhttp://www.a.com/script/b.js     # Same domainhttp://www...

10,752 0       FRONT END JSONP CROSS DOMAIN CROSS ORIGIN CORS DOCUMENT.DOMAIN WINDOW.NAME


  JavaScript cross domain request solution

1. What is cross domain?We may often using AJAX to request data from other domain, now we will have cross domain request issues. It's because JavaScript only allows to request data from the same domain because of security consideration. In short, same domain strategy means a piece of code can read data from the same source, the same source here means the combination of the same domain, protocol and port number.For example:URLDescriptionAllow communication?http://www.a.com/a.js http://www.a.com/b.jsSame domainYeshttp://www.a.com/lab/a.js http://www.a.com/script/b.jsSame domain differe...

4,334 0       SECURITY AJAX CROSS DOMAIN