jashkenas/backbone — pull request #3410 by kperry42 (2014-12-11 19:48:38+00:00)
Title: Fix fetch() to properly handle HTTP 304 "Not Modified"

jQuery.ajax allows you to pass the option ifModified: true. Doing this means the server may return an HTTP 304 Not Modified header, and no data; and jQuery.ajax will treat the 304 return as a "success" instead of an "error". Backbone currently sees this as a success with no data, and empties the collection - not the desired behavior. This patch checks for this condition in the success() callback, and skips the model/collection set/reset operation.