This post depicts a simple mechanism for retrying Ajax requests in the event of a failure. The purpose is to give the service "class" a function that wraps a jQuery Ajax call and the number of times the request should be tried. The whole premise works off of jQuery Deferred Objects and Promises. When the service is first called, a general deferred object is created. This object succeeds on the first successful try and fails when the number of failures hit the maximum failures allowed. Additionally, a call back function can be provided which is executed on every single try. The use of deferred objects also simplifies the code required, since the success/failure paths will be similar to making regular Ajax calls, which are inherently deferred objects in jQuery.