Blog / Technical SEO /
How to compare HTML snapshots after a template change
The template change goes live and the page looks the same. Great. But is it the same? A raw HTML diff of two snapshots is a wall of red and green, most of it meaningless.
So make the comparison useful. Choose representative pages, filter out the noise and check whether the important content and signals changed.
Capture comparable snapshots
I save snapshots from the same environment, URL, device and state wherever I can. Note scripts, personalisation or dynamic data that may vary. Include a representative product, collection and content page if they use different templates.
Focus the comparison
Look for changes to titles, headings, canonical tags, robots directives, structured data, links, alt attributes and main content. Ignore generated IDs or formatting noise unless they affect behaviour. I always pair the diff with a rendered-page check, because HTML alone doesn’t show every problem a visitor would see.
Turn findings into tests
Record expected and actual changes, assign an owner and verify after release.
Take the snapshots before you change anything
The best time to capture a baseline is before the release. Save the HTML of a product page, a collection, an article and the home page, with the date and the URL. If you wait until something looks wrong, you’ve lost the “before”. Store them somewhere that other people can reach, with a note of what each file is.
Use the same method each time: the same tool, the same logged-out state, the same device type. Differences in cookies, location or A/B tests can create changes that have nothing to do with the template.
Cut the noise
Raw diffs are full of things that change on every load: timestamps, nonces, generated class names, tracking IDs, inline script ordering. Strip or ignore those first. Then look at the parts that matter to search and to shoppers:
- Title, meta description and headings.
- Canonical and robots directives.
- Structured data blocks.
- Internal links and their anchor text.
- Image sources and alt attributes.
- The main text content and its order.
If the main content moved lower in the document or a heading level changed, note it even if the page looks identical.
Read the diff with a purpose
Don’t try to understand every line. Ask specific questions. Is the canonical still correct? Did a link disappear from the navigation? Did the price or availability markup change? Did a script now inject content that used to be in the HTML? Write the answer to each, and mark any change that was expected as expected.
Handle the cases that fool a diff
Some changes don’t show in HTML at all. A script that adds content after load, a lazy-loaded section or a client-side redirect will be invisible in a static snapshot. If the template relies on JavaScript for important content, compare the rendered DOM too, and look at the page with a throttled connection. Likewise, a harmless-looking reorder of blocks can move the main content far down the document. Note position as well as presence.
Write down what you accepted
Some differences are deliberate, such as a new menu or a different footer. Record those as accepted so they don’t get flagged again, and so the next reviewer knows they were seen. A diff with notes is a record of decisions. A diff without notes is just a diff.
Turn findings into repeatable tests
Once you know what matters, write it as a short check: expected title pattern, expected canonical, expected number of internal links in the header. Run it after every release on the same sample of pages. A small, steady check beats a heroic review after something has gone wrong.
Assign an owner for each failed check and verify the fix on the live page, not just in staging.
If you run this routine for a few releases, you’ll find it takes minutes. The first time is slow, because you’re deciding what matters. After that it’s a habit, and habits catch problems early.
Keep the snapshots after the review as well. If a problem turns up a month later, you can go back and see exactly when it started.
Related reading
- Diagnosing broken internal links after a navigation change
- Structured data QA after a template or plugin change
- How to compare page response codes before and after launch
Which template field would be most important to compare in your next snapshot review?