SlexAxton/require-handlebars-plugin — pull request #106 by rkstar (2013-04-19 02:47:46+00:00)
Title: Reliable cross-domain template loading with MSIE v7-9 using XDomainRequest

I updated the getXhr and fetchText functions to check for the domain you are on vs. the domain you are trying to load a template from. It also checks to see if the browser is MSIE v7-9.

If you are on a different domain and using MSIE 7-9 browser, it will create, configure, and use XDomainRequest instead of XMLHttpRequest to load the template. This works reliably in all aforementioned versions of MSIE.

Caveat: This will rely on the web server being configured with the proper Access-Control-Allow-Origin headers either through server configuration or script manipulation.