views:

61

answers:

2

When i do the following:

$.ajax({
  type: 'GET',
  url: 'http://www.domain.tld/feed',
  dataType: 'xml',
  success: function(data) {
    ...
  }
});

Everything´s fine in IE(8).

But when i change the url option to

http://www.domain.tld/?feed=myfeed

IE does nothing. I think the ? is the problem, but how can i get this working in this lovely browser?

+1  A: 

And if you use the data object does that work?

see here jquery ajax

data (Object, String)

Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below).

in your case

$.ajax({
  type: 'GET',
  url: 'http://www.domain.tld/',
  dataType: 'xml',
  data: "feed=myfeed",
  success: function(data) {
    ...
  }
});
PoweRoy
It´s sadly the same problem.
Arne Cordes
Also try the alternative format for data ...
Tim
data: ({feed: "myfeed"})
Tim
No difference in IE.
Arne Cordes
A: 

Try this:

$.ajax({
    type: 'GET',
    url: 'http://www.domain.tld/feed',
    dataType: 'xml',
    data: "feed=myfeed",
    success: function(data) {
        // success handler...
    }
});

When you do this for a url: http://www.domain.tld/?feed=myfeed

I believe you are saying request to the default page in the domain: http://www.domain.tld/

[EDIT]

Ajax IE Caching Issue

Gutzofter
Only the first feed has the URL "/feed", the second is just an argument for the base URL, not for "/feed".
Arne Cordes
Then it might be a caching issue with IE and get request.
Gutzofter
Try link: Ajax IE Caching Issue. See above for edit
Gutzofter