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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:00:21+00:00 2026-05-27T20:00:21+00:00

I’m experiencing a difficult ajax error in IE9. I will say up-front that this

  • 0

I’m experiencing a difficult ajax error in IE9. I will say up-front that this is not technically a cross-domain request so I’m sure that is not the problem.

Edit: It appears that the problem may be related to a same-domain request being treated as cross-domain, though it is not clear why (see comments).

I’m using a local proxy to make cross-domain ajax requests, and the url I use looks like http://localhost/proxy/?target=..... All good browsers are happy with this but IE immediately returns an error before the request is even dispatched (I have verified this using Fiddler and IE’s developer tools network capture).

When I inspect the error object passed to JQuery’s ajax.error callback its isRejected() function returns true, but I can’t find out what would cause a request to be rejected. The error object’s readyState is 4 (implying the request is complete?), status is 0 and statusText is “error”.

I’m building my request a bit like this:

$.ajax(url, {
    data: {...list of parameters...},
    dataType: 'json',
    type: 'GET',
    success: function() { ... },
    error: function() { ... },
    beforeSend: proxy.beforeRequestSend,
    timeout: 35000
});

The proxy.beforeRequestSend function looks like this:

this.beforeRequestSend = function(XHR, settings) {

  if(that.proxyRequired(settings.url)) {
    // I've also tried using the full url (http://localhost/proxy/?...)
    settings.url = 'proxy/?target=' + encodeURIComponent(settings.url); 
  }
};

Does anyone know what would cause the request to fail outright in IE9? Unfortunately I don’t have access to IE8 or 7 for testing but I assume they would behave the same. The fact that JQuery’s ajax error handler is invoked suggests that the error is not occuring while I am building the request, but when it is supposedly executed. All other browsers working correctly tells me that the fundamentals are correct.

I have previously read that the JQuery / IE combo has issues url-encoding some characters, but if I alert settings.url at the end of the beforeSend function the target URL is correctly encoded (this also tells me that that.proxyRequired(settings.url) returns true).

Any input much appreciated.

  • 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-27T20:00:22+00:00Added an answer on May 27, 2026 at 8:00 pm

    As you can see in my question’s code I am prepending the proxy url in the JQuery.ajax function’s beforeSend callback (proxy.beforeRequestSend). By the time this function is executed JQuery has already inspected the request and decided that is it cross-domain.

    As a result JQuery was treating all my requests as cross-domain, even though they all went to the local proxy. JQuery then rejected any cross-domain request in IE and Opera because they don’t support CORS.

    Fortunately the crossDomain property is passed to the beforeSend callback in the settings object and is easily changed.

    this.beforeRequestSend = function(XHR, settings) {
    
      if(that.proxyRequired(settings.url)) {
        settings.url = 'proxy/?target=' + encodeURIComponent(settings.url);
        settings.crossDomain = false;
      }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.