Page Header Not Loading...Netlify issue?

Hello everyone,

I finally finished my site and posted it on Netlify, but I’m having an issue with the page headers loading on some pages. I have an separate HTML page for the page header and I’m using JS to pull it into various pages (just like I’m doing for the header and footer).

Does anyone have any idea what the problem is? Is it possibly related to the images on my page not being cached and the page taking too long to load?

NOTE: I didn’t see this issue when I was on my local server, but now that it’s on Netlify I’m noticing the issue on the Gallery and Contact Us page. The products page seems to be okay.

Thank you in advance for your time. Any assitance would be appreciated.

hey there, so, if you look at the gallery and also the contact us page, you’ll see some JS errors in your console:

I’m not sure what is causing it, but i bet this is the source of the problem.

You might check this to see if this is the reason why:

Thanks a lot for your reply. I don’t know why I didn’t check the developer tools before. It looks like I had two issues.

  1. I included duplicate JS. I had the function in a <script> tag at the bottom of my gallery.html document. When I removed it I started getting an "cannot read property ‘innerHTML’ of null, which I eventually identified as the issue.

  2. My JavaScript was executing before my page was fully rendered so I had a null value for one of my variable. When I updated my JavaScript and updated my page, the issue was resolved. Thanks a lot @perry.

1 Like