1

I'm developing an application using Electron Framework. I have to include static parts like header.html and footer.html in all pages. How Can I do that with javascript? (Something equivalent to php 'include'.)

I tried this

<script>
    $(function(){
      $("#includedContent").load("header.html");
    });
</script>
<div id="includedContent"></div>

but there is a lag before html content load (not very nice to see) and I would to avoid that lag

  • Possible duplicate of [Include another HTML file in a HTML file](https://stackoverflow.com/questions/8988855/include-another-html-file-in-a-html-file) – user3351605 Aug 09 '17 at 12:11

0 Answers0