Why are console errors appearing on my website's first load?

Topic summary

A website is experiencing JavaScript errors on initial page load that prevent homepage slideshow images from displaying. The errors disappear upon browser refresh.

Root Cause:
Console errors indicate jQuery is not loading properly before scripts that depend on it execute, resulting in “Can’t find variable: jQuery” reference errors.

Proposed Solutions:

  • Verify jQuery loading order: Ensure the jQuery <script> tag appears before all dependent JavaScript files in the theme’s HTML
  • Confirm jQuery inclusion: Check theme files to verify jQuery is properly included (typically loaded by default in Shopify themes via CDN or local file)
  • Code modification approach: One responder suggests adding specific code to the theme by navigating to Online Store → Theme → Edit code, then pasting markup before the </body> tag

Current Status:
The issue remains unresolved with multiple troubleshooting suggestions provided but no confirmed fix implemented.

Summarized with AI on November 20. AI used: claude-sonnet-4-5-20250929.

Hello,

My site https://skinshape.com/

is getting console errors on first launch. If I refresh the browser, errors go away.

The javascript errors are preventing my site from showing images on the home page. I have a slideshow below the menu, but no images are being displayed in the slideshow.

I am using Safari on a Mac in “Private” mode meaning no other browser extensions are running.

Here are the console error messages:

[Error] ReferenceError: Can't find variable: jQuery
Global Code (api.jquery-e94e010e92e659b566dbc436fdfe5242764380e00398907a14955ba301a4749f.js:1:5310)

[Error] ReferenceError: Can't find variable: jQuery
Global Code (plugins.js:1:32804)

[Error] ReferenceError: Can't find variable: $
(anonymous function) (site.js:1:578)
Global Code (site.js:1:59448)

[Info] Successfully preconnected to https://cdn.shopify.com/ (x4)

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (favicon.ico, line 0)

Screenshot

The console errors you’re experiencing indicate that jQuery is not being loaded properly on the initial page load, which is causing subsequent JavaScript errors and issues with image display. Here are some steps you can take to troubleshoot and resolve the problem:

  1. Check jQuery loading order: Make sure that jQuery is being loaded before any other JavaScript files that depend on it. Verify that the <script> tag for jQuery is present in your theme’s HTML, and it’s placed before other scripts that use jQuery.

  2. Ensure jQuery is included in your theme: Check your theme’s code files to confirm that jQuery is included. In Shopify themes, jQuery is typically included by default, but if it’s missing or modified, you may encounter issues. Look for references to jQuery, either as a local file or from a CDN (Content Delivery Network).

Hi @Glenn_Marcus,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the ⇒ save


Hope my solution works perfectly for you.

Cheers!

Oliver | PageFly

1 Like