Steps to Troubleshoot and Reproduce Milestone Schema Loader Script Issues: Missing or Delayed Loading on Websites

Overview

This guide explains common reasons why the Milestone Schema Loader Script may not fire during the initial page load in a browser. One frequent cause is a third-party script—such as Rocket Loader—that delays JavaScript execution, resulting in a “missing loaderscript” error in the Schema Manager dashboard.

This issue is environment-specific and may vary from site to site, requiring custom investigation and solutions.

Table of Contents

  • What is the Schema Loader Script?
  • Key Terms & Definitions
  • Steps to Reproduce the Issue
  • Recommended Solutions
  • Troubleshooting Summary
  • Related Articles

What is the Schema Loader Script?

The Milestone Schema Loader Script:

  • Dynamically loads schema JSON markup published via Schema Manager, based on the page URL.
  • Automatically removes any pre-existing schema on the page to prevent conflicts.
  • Is a non-invasive JavaScript snippet that must be embedded on every web page where a dynamic schema is required.

Key Terms & Definitions

Term Definition
Schema Loader Script JavaScript code that dynamically injects schema on a web page
Rocket Loader A third-party performance plugin (from Cloudflare) that defers JavaScript to improve page speed
Developer Tools Built-in browser tools used to inspect page behavior, network calls, and console output

Steps to Reproduce the Issue

Follow these steps to confirm if the schema loader script is being delayed or not firing:

  1. Open the Affected Page: Navigate to the client’s page where the schema is expected.
  2. Avoid Interaction: Don’t move the cursor or interact with the page immediately.
  3. Open Developer Tools (F12 in Chrome) → Go to the Network tab.
  4. Search for “schema” in the filter bar.
  5. Observe Initial Load:
  • If no schema-related requests appear, the loader script did not fire.
  1. Refresh and Interact:
  • Reload the page and move your cursor on the screen.
  • Check the Network tab again to see if schema requests now appear.

==image_1==.png

Recommended Solutions

Solution 1: Disable Third-Party Scripts That Defer Execution

  • Primary Cause: Rocket Loader or similar plugins may delay the schema loader script.
  • Action: Recommend the client disable Rocket Loader or the conflicting plugin.
  • Goal: Ensure the schema loader fires during the first paint (without interaction).

Solution 2: Adjust Script Execution Priority

  • Scenario A – Script via GTM:
    • If you have GTM access, set the schema loader script’s Tag Execution Priority to “1”.
    • If you do not have access, request the client’s developer to adjust script order.
  • Scenario B – Script Hardcoded:
    • If the script is hardcoded and still delayed, ask the client to remove the third-party plugin causing the conflict.
    • Alternatively, move the schema script higher in the head section of the HTML.

Client Communication Note:

Inform the client clearly:

  • What’s causing the issue (e.g., Rocket Loader)
  • Why schema is not firing (delayed JS)
  • What needs to change (disable plugin, adjust script order)
  • Ask them to test changes and confirm results

Troubleshooting Summary

Issue Cause Fix
Schema loader script doesn’t fire on page load Rocket Loader or similar scripts delay JS Disable or reorder conflicting scripts
Script only fires after user interaction JavaScript execution deferred Raise priority in GTM or load earlier in HTML
Schema remains missing even after fix Incorrect GTM setup or hardcoded conflicts Contact Engineering Team for deep dive