I have a page that grabs content from a XML file through a Jquery AJAX call.
The problem is it will update the content from the XML file on a refresh for every browser except IE.
I have tried to solve this with meta tags
<meta http-equiv="expires" content="-1"/>
<meta http-equiv="cache-control" content="no-cache,must-revalidate" />
<meta http-equiv="pragma" content="no-cache"/>
This is a small portion of the relevant javascript
$(document).ready(function(){
$.ajax({type: "GET",url: "file1.xml",dataType: "xml", success: parseXml });
}
function parseXml(xml){
document.getElementById(eventMonthName).innerHTML=firstxmlvari.getElementsByTagName('month')[0].childNodes[0].nodeValue;
}
Any suggestions would be very appreciated!
Yes, probably you run into IE’s agressive caching…
Try setting the HTTP headers, but something that works for me, is appending the current time to the query string like this:
An example on JSFIDDLE: http://jsfiddle.net/WVBDc/, check the outgoing HTTP requests.