Nathan C
New Member
Hi All,
I am looking at streamlining the way I build websites.
I want to be able to include my navigation code in a separate HTML file and then pull it in to all the pages on the website. Just so if I want to update the nav I don't have to search and replace every page on the site I can just do it from one file.
Same goes for the website footer.
I have looked at a couple of different ways, one way was Javascript function that pulled in a HTML file something like this:
script>
$(function(){
$("#slider").load("/includes/home/slider.html");
});
</script>
This worked fine but I cant help but think that it has negative effects on SEO, and load speeds seemed to also take a hit.
I think PHP includes might be the best way to do it without affecting SEO/load speeds much.
Has anyone had any experience with something similar/got any suggestions?
Thanks in advance,
I am looking at streamlining the way I build websites.
I want to be able to include my navigation code in a separate HTML file and then pull it in to all the pages on the website. Just so if I want to update the nav I don't have to search and replace every page on the site I can just do it from one file.
Same goes for the website footer.
I have looked at a couple of different ways, one way was Javascript function that pulled in a HTML file something like this:
script>
$(function(){
$("#slider").load("/includes/home/slider.html");
});
</script>
This worked fine but I cant help but think that it has negative effects on SEO, and load speeds seemed to also take a hit.
I think PHP includes might be the best way to do it without affecting SEO/load speeds much.
Has anyone had any experience with something similar/got any suggestions?
Thanks in advance,