Back when IE 9 came out, it was the first major browser to start caching redirects to improve performance. The IE team wrote a detailed blog post about it, but they still got some backlash (mainly from people that didn't set correct no-cache headers on redirects with side effects, like login pages).
The recently released version of Safari for iOS 6 has started caching AJAX POST requests, with no notification to developers at all. Not only is this unexpected, but it goes against the HTTP 1.1 standard, which states:
Responses to this method are not cacheable, unless the response includes appropriate Cache-Control or Expires header fields.
This means that if you have something like an edit page that uses AJAX to post the form, the first edit will work, but subsequent edits will return a cached "Success" message instead of sending the request to the server!
This is somewhat similar to Internet Explorer caching AJAX GET requests, except caching GET requests is nowhere near as dangerous. While GET requests are allowed to be cached, POST requests are not idempotent (they can have side effects) so they should never be cached. Sure, IE caches AJAX GET requests more heavily than other browsers, but this is allowed in the HTTP specs:
The response to a GET request is cacheable if and only if it meets the requirements for HTTP caching described in section 13.
Caching POST requests is horrible. How many times have you added no-cache headers to your POST pages? I'm going to have a guess and say never, since no other browser in the history of the World Wide Web has cached POST requests. This move has essentially broken the functionality of some AJAX-based edit forms, and developers might not notice the breakage initially. I hope this is a bug and not expected functionality, and it gets fixed at some point. Safari used to be a horrible browser with many DOM issues... I hope it's not heading this way again.
Functions are variables
Let's take a look at some examples.
Read more ⇒
I thought I'd give some link love to some of the lesser-known web development blogs I enjoy reading. This post was prompted by a post about my site at GiveUpInternet.com. I didn't expect the link (as I don't think my blog is very good for web development stuff), but I do appreciate it heaps! This blog hasn't really focused too much on web development, perhaps I should post more web development articles :)
- GiveUpInternet.com — As it says on the site, "Give Up Internet is a Humor Blog for Internet People and Developers." While it's technically not a web development blog, I love the posts on this site. Unlike a lot of other "humour" sites that post stupid things a lot of the time, it's got actual funny posts. It's one of the only humour blogs that I'm subscribed to.
- Hallvord R. M. Steen's blog and the Opera sitepatching blog — Hallvord is a developer for Opera Software. His blog covers the state of the web as it unfortunately is at the moment - Broken browser sniffer scripts, standards violations, and just general scripting stupidities. Things are definitely improving, but there's a LOT of broken scripts out there. Opera has a file called "browser.js" that contains patches to make these broken sites work correctly in Opera. Hallford's blog (and the Opera site patching blog) detail the things that Opera does to patch these broken sites. There have been some very interesting posts, including the horrible XML and XSLT on the Israeli rail website, how Google Docs used to print documents, and many others.
That's all for now... I might eventually write another blog post like this. Or a proper blog post :P :)
Until next time,
Read more ⇒