So I refused to believe that such a massive bug actually existed. I did some digging and built a test case: http://ejohn.org/files/bugs/modified/ http://ejohn.org/files/bugs/modified/headers.phps
Sure enough, there's a complete failure. Opera <= 9.6 are incapable of doing .setRequestHeader("If-Modified-Since", ...) or .setRequestHeader("If-None-Match", ...) (nothing is sent to the server). All versions of Opera (including 10b1) return a status of 0 instead of 304 (for when the content hasn't been modified). Thus, the test suite is failing in Opera 9.6 because the headers are never even sent (and, thus, act like a normal web page) - in Opera 10 it hangs because the tests are waiting for a success callback and are never receiving one. This deserves a blog post, what a complete fail. So, as far as fixing this goes, I'm really not sure. There doesn't appear to be any reasonable way to force Opera to send the headers. And even if we could it's not clear if it's possible to write a feature detect to determine if this will work properly (short of performing a full extra request to the server, which is unacceptable). I'm glad things are starting to get better in Opera 10, at least. I think we can change the xhr.status == 304 line to xhr.status == 304 || xhr.status == 0 to catch this painful case in the interim - although this will still cause the tests to fail in Opera 9.6. Ugh. I'll dig in to it a bit more, what a mess. --John On Mon, Jul 13, 2009 at 7:42 PM, lawrence.pit <lawrence....@gmail.com>wrote: > > Hi John > > > So it appears as if your patch doesn't work in Opera (the tests you > > committed fail in Opera 9.6 and hang in Opera 10). > > Upon first inspection it appears Opera is not sending the If-Modified- > Since header to the server even though it's definitely set on the xhr > object (I've tested this with Opera 9.5). > > The link below suggests that setting the If-Modified-Since and If-None- > Match headers didn't work with previous version of opera either, it's > not a jquery specific issue. > > > http://my.opera.com/qdb/blog/2008/09/28/an-jquery-bug-problem-feature-with-opera-9-27-ubuntu-with-etag-caching > > I don't think anything can be done about it except patching Opera. > > Using Opera 10 it hangs when you set the If-Modified-Since header on > the xhr object. I have no insight in whether Opera is working on > improving their xhr support for this version or not; clearly the Opera > community needs to step up if they want proper if-modified-since and > etag support. > > > Lawrence > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---