Cross origin error in jquery.load() : <p>I want to load html snippets into my html page with the following code:</p>

<pre><code>       &lt;div data-include="header"&gt;&lt;/div&gt;

        &lt;script&gt;
          $(function(){
            var includes = $('[data-include]');
            jQuery.each(includes, function(){
              var file = '_HTML/' + $(this).data('include') + '.html';
              $(this).load(file);
            });
          });
        &lt;/script&gt;
</code></pre>

<p>In Firefox and Safari it works perfect, but in Chrome and IE Edge it gives me a cross origin request error:</p>

<blockquote>
  <p>XMLHttpRequest cannot load file:///../header.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.</p>
</blockquote>

<p>Are there any workarounds for this error which are working in every of the named browsers?</p>
