DEV Community

Cover image for AJAX, XML and Internet Explorer
Kevinleary.net
Kevinleary.net

Posted on Originally published at kevinleary.net

AJAX, XML and Internet Explorer

While working on the KMC Partners website I stumbled upon a cross browser issue using jQuery’s AJAX $.get() method to load and parse XML data.

It seems that if you are using AJAX to load an XML file with UTF-8 character encoding, it will fail in both Internet Explorer 6.0 and 7.0.

<?xml version="1.0" encoding="utf-8"?></code>
Enter fullscreen mode Exit fullscreen mode

However, if you change that character encoding to iso-8859-1 it will load without issues in both versions of Internet Explorer.

<?xml version="1.0" encoding="iso-8859-1"?>
Enter fullscreen mode Exit fullscreen mode

This was a big headache for me, and I hope this helps someone else out there avoid a similar issue.

Top comments (0)