I have an ASPX page that generates RSS XML like this:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Title</title>
<link>http://www.example.com/news</link>
<description>An RSS feed for the latest news articles.</description>
<language>en-us</language>
<ttl>60</ttl>
<image />
<lastBuildDate>Thu, 11 Jul 2013 16:44:10 GMT</lastBuildDate>
<item>
<title>The Future of News</title>
<image>/uploadedImages/news/Articles/blog.jpg?n=104</image>
<link>http://localhost/news/Articles/5363/</link>
<pubDate>2029-01-11</pubDate>
<formattedDate>today ago</formattedDate>
<summary>Where will news be in 30 years? Check out what sort of news WE think we'll be making!</summary>
<description />
</item>
...
</channel>
</rss>
$.ajax({
dataType: ($.browser.msie) ? "text" : "xml",
url: newsfeed,
cache: true,
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(thrownError);
}
success: function (data) {
...
The solution to this problem involved detecting the web browser that was being used. If the browser is IE then instead of using jQuery AJAX I used IE's XMLHttpRequest. Here is my code:
var xhReq = new XMLHttpRequest();
xhReq.open("GET", "/Source/Handlers/Search.ashx?q=" + val + "&d=" + dateObj.getTime(), false);
xhReq.send(null);
AjaxSuccess(xhReq.responseText);
The AjaxSuccess method contains the same javascript that is called upon successful execution of the jQuery AJAX code.
So I got it working but I don't really know why IE didn't like the jQuery approach.