#331 ✓resolved
Kenneth Kin Lum

status 304 not checked for onSuccess for Ajax.Request

Reported by Kenneth Kin Lum | September 9th, 2008 @ 10:08 AM | in 1.7

it seems that prototype.js will consider the status >= 200 && < 300 as success. The status 304 is not checked, while there are 3 rather authoritative books that says Opera and some version of IE will return a status of 304 together with responseText or responseXML populated (even thought the HTTP response doesn't have the data part in the case of 304). These books are:

Bulletproof Ajax by Jeremy Keith

Professional Ajax, 2nd Edition (Programmer to Programmer) by Nicholas C. Zakas, Jeremy McPeak, and Joe Fawcett

Building a Web Site with Ajax: Visual QuickProject Guide by Larry Ullman

(can download their sample code or try their sample website and see their source code)

So I wonder, if the 304 is not considered, then there might be possibility of user clicking on a link and ajax invoked, but onSuccess doesn't catch it, when the status is 304. Thanks very much. (prototype is great by the way)

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 ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Referenced by

Pages