I have my nav bar HTML in its own file. It’s simple a href text with a 60KB image. I’m calling it with this at the bottom of my body:
<script>
$("#nav-placeholder").load("nav.html");
</script>
I’ve looked at the Network console and the nav.html is executed well after a few other files.
I tried adding the nav.html code directly to the main index.html, and this latency is gone.
I only have two pages, so I might hardcode it if I can’t figure out why this latency is happening. I’m using php -S to run on a localhost.
Any ideas? Thank you!
beepbeepboop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.