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,803 0       FRONT END JSONP CROSS DOMAIN CROSS ORIGIN CORS DOCUMENT.DOMAIN WINDOW.NAME


  Going Simple with JavaScript

I was making a change to a page that needed to pull from a remote API and make changes to various parts of the page. Sounds like the time to pull out jQuery and Ajax, doesn't it? Instead, I just used old fashioned JavaScript. Actually, I used new fashioned JavaScript. Browsers haven't stood still in the advent of libraries and frameworks. As a result, we can take advantage of those features when we need to bake in a little extra.Some JSONPThe first step was to get the JSONP call executing. This is generally straightforward: embed a script tag into the page. The script will run a function that ...

2,942 0       JAVASCRIPT NEW VERSION NEW ADDITION JSONP QUERYSELECTORALL