Skip to content

Commit

Permalink
Fixed spacing on the modified Ajax code.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Resig authored and John Resig committed Nov 25, 2009
1 parent ef819c9 commit 0f6e9a8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/ajax.js
Expand Up @@ -338,16 +338,16 @@ jQuery.extend({
xhr.setRequestHeader("Content-Type", s.contentType);
}

// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
if ( s.ifModified ) {
if ( jQuery.lastModified[s.url] ) {
xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]);
}
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
if ( s.ifModified ) {
if ( jQuery.lastModified[s.url] ) {
xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]);
}

if ( jQuery.etag[s.url] ) {
xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]);
}
if ( jQuery.etag[s.url] ) {
xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]);
}
}

// Set header so the called script knows that it's an XMLHttpRequest
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
Expand Down

0 comments on commit 0f6e9a8

Please sign in to comment.