Most (all?) browsers won't let you do cross site AJAX calls.
One solution is JSONP (which is supported by jQuery). However not all servers support it.
The other solution is to create a "trampoline" in your site that returns the data from the remote site:
If it won't be simple, it simply won't be. [Hire me, source code] by Miki Tebeka, CEO, 353Solutions
Subscribe to:
Post Comments (Atom)
2 comments:
And you'll get even better performance if you write the trampoline in C.
This is a really useful technique and I'm kind of surprised it isn't used more often. For example it can be used to implement complex redirection behavior on hosts where you don't have total control over the server configuration.
I doubt how much speedup you'll get from writing this in C since most of the time is spent on I/O.
If you want to speed things up without much effort, consider using Cython.
Post a Comment