AJAX Interactions Need Activity Indicators

AJAX interactions from the client to the server are wonderful for user experiences. With a little JavaScript magic, form submissions, data loading, and any other interaction of the server can be done without reloading the page. One can build web applications all on one page with JavaScript frameworks like Backbone.js and Ember.js. The magic of […]

These Intermittent Test Failures Will Not Stand, Man

I recently spent some time cleaning up a large test suite that had fallen into a bit of disrepair. The project was a Ruby on Rails web application being tested with RSpec and Cucumber. The biggest problem was that various tests would fail intermittently. Some tests would pass consistently when run by themselves, but would […]

Mobile Safari on iOS 5.1 Unexpectedly Making Cross Origin Resource Sharing Requests

I was astonished when I finally understood a problem my web application was experiencing recently: After viewing a PDF file from Mobile Safari on the iPad, the browser treated all future Ajax requests in that browser tab as Cross Origin Resource Sharing requests and subsequently sent the HTTP ‘OPTIONS’ verb, rather than the ‘GET’ verb […]

Upload Files Directly to S3 with Plupload, Rails, and Paperclip

Plupload is an open source javascript upload handler that supports uploading files directly to Amazon S3. This is an alternative to uploading files to the web server, and then to S3. You will need to use the Flash or Silverlight options to upload directly to S3 because Amazon has yet to enable cross-origin uploading.

Chaining jQuery Ajax Calls

Starting with version 1.5, jQuery has provided Deferred Objects to make working with asynchronous functions a little easier. A canonical example of its usage might be: $.getJSON('/dataz').then(function(objects) { alert('I got some json data: ' + objects.length); });$.getJSON('/dataz').then(function(objects) { alert('I got some json data: ' + objects.length); }); I was recently working on some code that […]