Skip to main content
","learningResourceType":"Practice problem","educationalLevel":"hard","about":"HTML","teaches":"the preload scanner","url":"https://journeyuncommon.com/quiz/question/7df64b76-54b9-4222-89a7-1a76ea2c8ebb","inLanguage":"en","isAccessibleForFree":true,"provider":{"@id":"https://journeyuncommon.com/#organization"},"isPartOf":{"@type":"WebSite","@id":"https://journeyuncommon.com/#website","name":"Journey Uncommon","url":"https://journeyuncommon.com"}}
Journey Uncommon Logo
JourneyUncommon
hardHTMLthe preload scannerSingle-choice MCQ

The preload scanner tokenizes ahead, but its speculative fetches must not be wrong. For the markup below it sees <img src> physically before the inline <script> that would change behavior. Why is fetching hero.jpg eagerly still considered safe here, unlike a document.write of a <base>?

<img src="hero.jpg"> <script>/* mutates later DOM, no document.write of base */</script>