thundermonkey.net : blog

Blog

13th August 2007, 11:25

Delivery data in multiple formats

In the world of web it's often the case you want to deliver exactly the same data, but in a different format - XHTML, XML, JSON, image, etc.

I've just started using a method that reduces the amount of code-duplication and immediately makes it obvious which format to expect on delivery.

Basically it boils down to sending a specific parameter in the query portion of a URL. For example, let's say that the following url delivers the details of Bob Bobbins' account:

Read full article...

Valid XHTML 1.1 Valid CSS! Firefox 2