#439 ✓resolved
Xavier Noria

use of "Ajax" in section about JSONP

Reported by Xavier Noria | September 11th, 2010 @ 06:49 PM | in The Rails 3 Way

The term "Ajax" appears in a few places in section 12.4.

For example you listen to "ajax:success", and the text says that "When the Ajax response is complete, your Ajax event handler is called and the JSON data is passed to it as a parameter."

For those readers who have no intimate knowledge of jQuery's $.ajax I think it could be good to mention somewhere, perhaps in a footnote, that jQuery creates a script tag for you to bypass the same-origin policy.

Also, I wonder whether it could be useful to comment that JSONP can be also considered Ajax, albeit the request is not xhr? by Rails' definition. The Wikipedia entry for Ajax does not mention JSONP, but the JSON entry does, and we are talking async JavaScript anyway.

Otherwise the reader may wonder why are we listening to "ajax:success" and talking about Ajax responses if we are using vanilla script tags.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Tags

Referenced by

Pages