logo

New Response

« Return to the blog entry

You are replying to:

    • avatar
    • Jake Howlett
    • Posted on Tue 13 Jun 2006 07:41 AM

    @Rod:

    "Set the page content type... ...For JSON, setting it to "text/javascript" would be appropriate."

    Not strictly true. The accepted content-type for JSON is text/plain. Seems odd but there's good reason for this. What you return to the browser is text. It's not JavaScript until the code back at the browser runs the eval() method on the string.

    At least that's how I understand it.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: