Jim Rogers

Lives in Baton Rouge, LA, with two dogs, one cat, and one lovely wife. I'm a lead developer for GCR & Associates.

Katrin and Jim

Month List

Reformatting with AJAX

by Jim Jul 06, 2006 9:42 PM

AJAX is a technology whose intended (or typical) use is to exhange small amounts of data with a server, from javascript on a web page, so that the page can be updated without reloading the whole thing.

Not long after I heard of this, it occured to me that it can be used to load HTML from any page, and then reformat it, with all the parsing occuring on the client. There's no parsing happening on the server, so a lot of people can view the reformatted page, with all the processing happening on their machines. In fact, the script that does the parsing doesn't even have to be on any server. Of course, the HTML has to come from somewhere, but we're shamelessly grabbing someone else's data and reformatting it. :-)

Because we're using AJAX to get data from a different domain, Internet Explorer 7 warns you about a security risk. It looks like Firefox and IE6 won't allow it at all. This seems a little too restrictive to me - it seems reasonable that a company might operate servers with seperate domains. I suppose the designers though it more likely that someone like me would want to see data and not adds.

So here's my little page, if you have IE7:

I didn't like the way the live Tour de France feed worked - the latest entry is always at the bottom. This won't look like much unless the the tour is actually happening. (The link in the header is the original page.)

Tags:

Comments (1) -

2/13/2010 10:09:14 AM #

Jim

Update: Of course cross-domain requests are no longer allowed with ajax, for security reasons, so you can't do this from a page on a website. However if t he page and script are on the local machine, loaded from the file system, then this can still be done.

Jim United States

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading