> > From: Michael Geary
> > Just use $.getJSON() or $.ajax() with the 'json' or 'jsonp' 
> > dataType as needed.

> From: Stephan Beal
> Speaking of: i recommend AGAINST using getJSON() because it 
> muddles up my Apache logs horribly (the JSON gets encoded in 
> the request, which gets logged as urlencoded garbage). JSON 
> should, IMO, be sent over POST.

I just replied to a similar point in another thread, but just for anyone who
is reading this thread...

Your point is well taken about *uploading* JSON data with POST instead of
GET. In that case, using JSON.stringify() and putting the data in a POST
would be a very good idea. (If you're updating data on the server, then you
should be using POST instead of GET anyway, even if you weren't using JSON.)

But if you're just *downloading* JSON data and not updating state on the
server, then you may as well just use a GET. The query parameters from the
GET will show up in your server log, but those aren't that lengthy in a
typical GET request.

-Mike

Reply via email to