This is my first time writing web pages, and I want to include 'header' files, 'navbar' files, and 'footer' files in each page I write.
There was a recommendation to use something like:
<script>
$(function(){
$("#header").load("header.html");
$("#navbar").load("navbar.html");
$("#footer").load("footer.html");
});
</script>
and then just use <div id="header"></div>
in place of my ~20 line header text and just place that text in the header file. That way, this header gets changed once and all pages reflect the change.
I have noticed, however, that when I load this file, instead of hardcoding the header in the page, it takes a split second for the navbar/header/etc. to load. Is there any way to speed this up?