Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7433265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:35:17+00:00 2026-05-29T09:35:17+00:00

$.ajax({ async:false, type: ‘POST’, url: itemURL, success: function(data,status,jqXHR) { responseObj = data; console.log(‘success function

  • 0
  $.ajax({
                async:false,
                type: 'POST',
                url: itemURL,
                success: function(data,status,jqXHR) {
                    responseObj  = data;
                    console.log('success function resp');
                    console.log(jqXHR.getAllResponseHeaders());
                },
                error: function(data){
                    responseObj = data;
                },
                data:item,
                dataType: "json",

    });

Here’s my code; i am unable to print response headers; am i missing anything? all that prints out is empty string.

Tried using getResponseHeader(“Location”), that’s not working either; I am trying to get “Location” header that’s being returned for the AJAX call.

However firbeug shows all response headers including “Location” which I am after.

I am using Jquery 1.7.1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:35:18+00:00Added an answer on May 29, 2026 at 9:35 am

    I worked with @Satish in helping to answer this question. This was basically a CORS issue, but, it turns out there were two issues involved here:

    1) The server needed to add ‘Location’ to the Access-Control-Expose-Header response header, this allows conforming XHR Level-2 clients to see the extra header.

    2) WebKit clients had a bug where they would ignore the Access-Control-Expose-Header when returning headers for an XHR response. This was fixed in WebKit recently https://bugs.webkit.org/show_bug.cgi?id=76419, and we verified that it’s now working in Safari based on that WebKit.

    Just to add some background, the request was POSTing to a REST service to create an object. The server response had a status of 201 and stored the location of the new resource in the ‘Location’ header. As this was a CORS request, the XHR was stripping the ‘Location’ header. Adding the header and upgrading to a version of WebKit with the fix corrected this issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have: $.ajax({ type: 'POST', url: myLink, async: false, dataType: 'html', success : function(page)
$(document).ready(function() { $.ajax({ type: 'post', async: false, url: 'WebService.asmx/GetCustomerInformation', data: '{}', contentType: 'application/json;charset=ytf-8', dataType:
$.ajax({ url: /cgi-bin/stats.exe, method: post, async: false, data: { refresh: a41 } }); Using
.ajax({ type: 'POST', url: '..serverices/ajaxserver.asmx', data: 'lname='+ $('#lastname').val() }); return false; if #lastname has
$(document).ready(function() { var response = $.ajax({ type: GET, url : http://www.google.com, async : false,
var htm = $.ajax({ type: GET, url: ./viewforms, async: false }).responseText; var myObject =
This is my Javascript $.ajax({ url: url, dataType : json, async : false, success
I am reading a xml using $.ajax() request. $.ajax({ type: GET, async: false, url:
I have this AJAX: $.ajax({ url : get_base_url() + 'update', type : 'POST', async
I have this little piece of code: <script> $(window).bind('beforeunload', function() { $.ajax({ async: false,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.