Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript access ajax response headers

// Remember to add JQuery to your html head!

var xhr = $.ajax({
    url: 'someurl',
    complete: function(data) {
        // Access your response headers by using return value
      	xhr.getResponseHeader("date"); // Specify here the type of header
    }
});
 
PREVIOUS NEXT
Tagged: #javascript #access #ajax #response #headers
ADD COMMENT
Topic
Name
3+1 =