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 8657235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:28:19+00:00 2026-06-12T15:28:19+00:00

An AJAX request, using jsonp, to an external Play! 1.2.4 application on Heroku, which

  • 0

An AJAX request, using jsonp, to an external Play! 1.2.4 application on Heroku, which returns data successfully, returns null ongetResponseHeaders().

Here is my code:

var ajaxresult;
    ajaxresult = $.ajax({
    'complete': function (jqXHR, status) {            
        console.log('Complete!');
        console.log(status);
        console.log("on compelte: " + jqXHR.getAllResponseHeaders());
    },
    'dataType': "jsonp",
    'error': function (jqXHR, status, error) {
        console.log('Error!');
        console.log(status);
        console.log(error);
        console.log("on error: " + jqXHR.getAllResponseHeaders());
    },
    'success': function (data, status, jqXHR) {
        console.log('Success!');
        console.log(status);
        console.log(data);
        console.log("on success: " + ajaxresult.getAllResponseHeaders());
        console.log("on success(2): " + jqXHR.getAllResponseHeaders());
    },
    'type': 'GET',
    'url': url + "findAllSpecials"
});

If I dump the contents of jqXHR, I get:

"readyState: 4","setRequestHeader: function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this}","getAllResponseHeaders: function(){return s===2?n:null}","getResponseHeader: function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c}","overrideMimeType: function(a){s||(d.mimeType=a);return this}","abort: function(a){a=a||\"abort\",p&&p.abort(a),w(0,a);return this}","done: function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this}","fail: function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this}","progress: function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this}","state: function(){return e}","isResolved: function(){return!!i}","isRejected: function(){return!!i}","then: function(a,b,c){i.done(a).fail(b).progress(c);return this}","always: function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this}","pipe: function(a,b,c){return f.Deferred(function(d){f.each({done:[a,\"resolve\"],fail:[b,\"reject\"],progress:[c,\"notify\"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+\"With\"](this===i?d:this,[g])}):i[a](d[e])})}).promise()}","promise: function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}","success: function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this}","error: function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this}","complete: function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this}","statusCode: function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this}","status: 200","statusText: success"]

The response headers as seen in Opera and Firefox are:

HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Type: text/plain; charset=utf-8
Server: Play! Framework;1.2.4;prod
Set-Cookie: PLAY_FLASH=;Expires=Fri, 5-Oct-12 12:47:15 GMT;Path=/
Set-Cookie: PLAY_ERRORS=;Expires=Fri, 5-Oct-12 12:47:15 GMT;Path=/
Set-Cookie: PLAY_SESSION=...
Content-Length: 1290
Connection: keep-alive

Why is is that using getAllReponseHeaders() returns null when the browser can see the headers? Does cross domain requests prevent response headers from being sent to the AJAX response?

All help is welcome.

Thanks!

  • 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-06-12T15:28:21+00:00Added an answer on June 12, 2026 at 3:28 pm

    i’m afraid that most of the browser’s (Mozilla,Safari,Chrome) does not yet support Access-Control-Expose-Headers so your getAllReponseHeaders() will not work..

    its been raised as a bug in mozilla firefox forums. But recently they have a fix here is the link you can check it out This

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

Sidebar

Related Questions

I am executing an AJAX request using jQuery as such: $.get({ url: 'run_program.php', data:
So I'm using an ajax request to pass some data for filtering purposes. Then
I'm using a cross-domain Ajax request to an external API. Every so often it
I'm trying to do an AJAX request using Jquery. The JS file is located
I am making a simple ajax request using jquery . Below is my ajax
I'm trying to POST a http request using ajax, but getting a response from
I'm using jQuery to setup an Ajax request that grabs an XML feed from
I perform an AJAX request to a PHP script in JavaScript and by using
I'm submitting a form using an ajax request (POST method), and checking the HTTP
I am using JQuery UI plugin blockUI to block UI for every ajax request.

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.