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>

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"?>

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

Resources

Meet the Author

Kevin Leary, WordPress Consultant

I'm a custom WordPress web developer and analytics consultant in Boston, MA with 17 years of experience building websites and applications. View a portfolio of my work or request an estimate for your next project.