Sub topic 5
Update dates only when the content really changed
Assume you know basic HTML, JSON, and how crawlers retrieve web pages. This chapter focuses on deciding when a page’s publication or modification date should change. The goal is to report useful freshness signals, not to make old content look new.
What counts as a meaningful update?
A meaningful update changes the page’s accuracy, usefulness, or scope. Examples include:
- Correcting a product specification that could affect a purchase.
- Replacing an expired price or availability status.
- Adding a new section based on current evidence.
- Updating instructions because a software interface changed.
- Revising a recommendation after the underlying options changed.
A spelling correction, layout change, or automatic template rebuild usually does not deserve a new dateModified value. It may still deserve an internal change record.
| Change | Update the public modified date? | Reason |
|---|---|---|
| Fix an incorrect product weight | Yes | The factual content changed |
| Change a heading’s font size | No | The information did not change |
| Add a current comparison section | Yes | The page gained useful content |
| Re-save the page during a deployment | No | No meaningful editorial change occurred |
Search engines and answer systems cannot judge your editorial intent perfectly. They compare dates with page content and other signals. Repeatedly changing dates without adding value can weaken trust and make the date less informative.
Use an editorial change test
Before changing a date, ask:
- Did a fact, recommendation, instruction, or example change?
- Would a reader who saw the old version notice a useful difference?
- Can an editor describe the change in a short revision note?
- Does the new date match the time the change became available to readers?
If the answer to the first two questions is no, leave the public date unchanged. If only generated metadata or formatting changed, record the event internally instead.
A simple workflow separates content changes from technical events:
Store change intent with the content
Keep the editorial timestamp in the same authoritative record as the page content. Do not calculate it from every deployment. The following example updates the date only when the content hash changes:
from datetime import datetime, timezone
import hashlib
def content_hash(text):
return hashlib.sha256(text.encode("utf-8")).hexdigest()
def publish_revision(record, new_body):
new_hash = content_hash(new_body)
if new_hash == record["body_hash"]:
return record
now = datetime.now(timezone.utc).isoformat()
return {
**record,
"body": new_body,
"body_hash": new_hash,
"date_modified": now,
}
page = {
"body": "Trail shoes should fit securely at the heel.",
"body_hash": content_hash("Trail shoes should fit securely at the heel."),
"date_modified": "2026-11-20T08:00:00+00:00",
}
page = publish_revision(page, "Trail shoes should fit securely at the heel.")
print(page["date_modified"])In a production system, normalize content before hashing so insignificant whitespace or generated identifiers do not create false changes. A reviewer should still decide whether the changed content is meaningful. Hash comparison detects difference; it does not understand editorial value.
Exercise
An editor changes three sentences to correct a misleading product claim but keeps the same recommendation. Should the page's modified date change?
Show answer
Yes. The factual content changed and the correction affects reader trust, even though the overall recommendation stayed the same.