Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

php: waiting for other slow websites



Danny Robert wrote:
> It was my understanding (and admittedly I'm an AJAX n00b) that
> XMLHttpRequests were limited such that they can only make requests back
> to the originating server.  (The premise that this would reduce the
> possibilities of cross-site scripting and some security concerns.)
....
> The last advantage in writing a local service that can call out is to
> support David's AJAX suggestion.  If the service is local, there is no
> problem making the request back.  Your content can send an
> XmlHTTPRequest to your own service (say, getFlickerImages(...)) which
> does the grunt work but doesn't hinder the initial load time of the

Yes.  Sorry for not explicitly saying it, but that's what I had in mind. 
  The client-side JavaScript calls a page from your server which in turn 
gets the required third-party content.

In fact, if you're really good, you can have the PHP code start to 
gather the third-party content on the first request to reduce reply time 
on the second request, or even cache it periodically and print it from 
the cache.

One more "Nagging Nanny" point: Make sure you're allowed to use this 
third-party content legally.  Some website specifically restrict you 
from reusing/reposting their content.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org