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, Custom WordPress Developer & BigQuery Consultant

I'm a custom WordPress developer and BigQuery consultant based in Boston, MA. I've been an independent freelance contractor for the last 16 years, helping business build, grow and maintain product websites, web applications and analytics systems. See real-world examples of my work, or contact me about your next project if you're in need of a good freelance developer.