Yet another cross domain AJAX solution

Technical, AJAX, 455 words  


Most browsers adhere to the “same-origin” policy, which prevents AJAX calls between different servers identified by their host name as a security measure.
There have been a number of approaches used to solve this problem and here is a brief list of them.

  1. From the client side, depending on the browser, you can lower browser security settings to allow for cross site / cross domain ajax.

  2. On the web server side, use reverse proxy (for proxying a site not on the same server) or url rewrite (for a site that’s on the same server) to allow the browser to see the two sites as if they were on the same server.
  3. If the two sites are sub domains on the same domain, use document.domain to make them use the same super domain.


All the above solutions have different requirements that bring about various other problems. Hence I had to come up with another approach for a project based on ideas from a discussion with a couple of colleagues.

This approach would ideally:

  1. Does not require server side changes.
  2. Does not require client side changes.
  3. Cross browser compatible.
  4. Works between any domain securely.
  5. Able to access DOM objects between each other

The following diagram illustrates how this approach works with iframes to manage call backs to an iframe.

Read more »

Using Naver Maps API without the key

Technical, Javascript, AJAX, 461 words  

Today for work I investigated the implementation of South Korean maps for one of our clients, unfortunately Google Maps doesn’t currently have street level details and view in South Korea. I ended up having to look at maps.naver.com which seems to be the only decent free korean mapping site available on the Internet with an API as well. Unfortunately for me, I did not understand korean, google translate was unable to help me with the site and there was no english translation available. After scanning through the API (in Korean), I managed to make out how implement the code but it was impossible to register without understanding the 10 step registration process in order to get an API key to use the maps . . . anyway here’s how I got it working without the API key!

Read more »

Conditional Comments for IE and AJAX

Technical, Rant, Javascript, AJAX, 251 words  

One of the biggest grief in web development is fixing these minor quirks between Internet Explorer and Mozilla based browsers like Firefox. Microsoft then makes it more difficult with more quirks between IE5, IE6 and IE7. To give Microsoft some credit, they seem to have genuinely tried to make IE7 more standards compliant than its predecessors. Just yesterday, Conditional Comments placed in my code for adding addition JavaScript code to fix IE quirks gave me some grief. Let me explain further…

Read more »

::

April 2024
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
 << <   > >>
Brinley Ang

Brinley Ang is a software engineer, sysadmin, coder, geek boy, jedi knight fragger, caffine addict, deaf meloncholic and rockstar wannabe. Listens to the sex pistols and a wide assortment of heavy metal.

Make payments with PayPal - it's fast, free and secure!
Search
home | portfolio | blog | links | contact
© 2024 - Brinley Ang
Valid xhtml