Skip to content Skip to sidebar Skip to footer

Trying To Read XML File But He Is Always The Same

I have a xml file that changed when i update some values, and i'm trying to read it from javascript in asp.net. But once i run the project, every time i try to read the xml file, t

Solution 1:

IE has a habit of caching AJAX requests. Try something like this:

Date d = new Date();
req.open('GET', 'Config.xml?_' + d.getTime(), false);

this will append the number of milliseconds since 1970 to each request, forcing IE to fetch a new version of the XML.


Post a Comment for "Trying To Read XML File But He Is Always The Same"