Repository navigation
In the Edge browser, the character {docsify-updated} is not replaced #2681
Description
Activity
- addedwait for informationsomething is not clear, waiting for the author of the issue/prsomething is not clear, waiting for the author of the issue/prand removedbugconfirmed as a bugconfirmed as a bug
on Apr 15, 2026 One thing that would help narrow this down is whether Edge is loading the same generated HTML and the same
last-modifiedresponse headers as Chrome after a hard refresh. Since the placeholder replacement depends on fetching/seeing that metadata, it would be useful to include the Edge version, whether any service worker/cache is involved, and a small network-panel screenshot for the markdown file request. That would separate a Docsify parsing issue from an Edge cache/header difference.Reacted by LuffyI found that in the Chrome browser, by adding a breakpoint to the line of code where the date is replaced, the breakpoint will take effect.

However, in the Edge browser, the breakpoint did not take effect.

One thing that would help narrow this down is whether Edge is loading the same generated HTML and the same
last-modifiedresponse headers as Chrome after a hard refresh. Since the placeholder replacement depends on fetching/seeing that metadata, it would be useful to include the Edge version, whether any service worker/cache is involved, and a small network-panel screenshot for the markdown file request. That would separate a Docsify parsing issue from an Edge cache/header difference.I'd like to take this on. Traced it down to
src/core/render/index.js:if (opt.updatedAt) { html = this.#formatUpdated(html, opt.updatedAt, this.config.formatUpdated); }
opt.updatedAtcomes fromxhr.getResponseHeader('last-modified')inajax.js. This is a truthy check — if that header comes back empty in Edge for this request, the whole replace step gets skipped silently, which matches what @yequanrui described (breakpoint on the replace line never fires in Edge).Going to verify with a Network-tab comparison between Chrome and Edge to confirm whether
Last-Modifiedis actually present/absent in Edge's response headers before proposing a fix. Will follow up with findings.Reacted by LuffyI'd like to take this on. Traced it down to
src/core/render/index.js:if (opt.updatedAt) {
html = this.#formatUpdated(html, opt.updatedAt, this.config.formatUpdated);
}
opt.updatedAtcomes fromxhr.getResponseHeader('last-modified')inajax.js. This is a truthy check — if that header comes back empty in Edge for this request, the whole replace step gets skipped silently, which matches what @yequanrui described (breakpoint on the replace line never fires in Edge).Going to verify with a Network-tab comparison between Chrome and Edge to confirm whether
Last-Modifiedis actually present/absent in Edge's response headers before proposing a fix. Will follow up with findings.Followed up on this — built a minimal repro against current
develop(v5) using a local static server, tested in both Chrome and Edge with cache disabled to rule out stale responses. In both browsers,{docsify-updated}correctly resolves to a real date; I couldn't reproduce the Edge-specific failure described here.Since the original report was on Docsify 4.13.1, it's possible this was fixed during the v5 rewrite, or it's specific to how the CDN (GitHub Pages/Fastly) exposes response headers to Edge versus a plain local server — that's not something I can replicate locally. If it's still happening on current
develop, more detail on the hosting setup would help narrow it down.Separately, while testing this I found a real, unrelated bug: the default
formatUpdated: ''config causes{docsify-updated}to always render blank (viatinydate('')always returning an empty string), regardless of browser. Happy to open a small PR for that if useful — want me to file it as its own issue, or is a direct PR fine?Separately, while testing this I found a real, unrelated bug: the default formatUpdated: '' config causes {docsify-updated} to always render blank (via tinydate('') always returning an empty string), regardless of browser. Happy to open a small PR for that if useful — want me to file it as its own issue, or is a direct PR fine?
formatUpdatedis empty by default; if you need to use it, you must set the format.Separately, while testing this I found a real, unrelated bug: the default formatUpdated: '' config causes {docsify-updated} to always render blank (via tinydate('') always returning an empty string), regardless of browser. Happy to open a small PR for that if useful — want me to file it as its own issue, or is a direct PR fine?
formatUpdatedis empty by default; if you need to use it, you must set the format.Ah, that makes sense — thanks for clarifying. Good to know it's intentional rather than a bug.
Since the original Edge-specific issue also didn't reproduce on current
developin my testing, is it worth closing this one out, or would you prefer to leave it open in case someone can reproduce it with more specific hosting details?Wait for the author; I can't reproduce this issue either. @yequanrui
Sounds good, I'll leave this to @yequanrui to follow up with more detail.
This is another solution. #1157 (comment)
Makes sense — given #1157 was closed as not planned for essentially the same root cause (header/timestamp behavior varying by host), this looks like a known limitation rather than something fixable in Docsify's code. I'll leave this closed on my end too. Thanks for digging up the history.

Description
https://yequanrui.github.io/CloudNotes/#/_index
It displays correctly in the Chrome browser, with
{docsify-updated}being replaced by the value oflast-modified.It is displayed incorrectly in the Edge browser. The
last-modifiedhas a value, but{docsify-updated}is not replaced.Expected behavior
Replace with the value of
last-modified.Actual behavior
{docsify-updated}has not been replaced.Steps to reproduce
Last update time:is correct in the Chrome browserLast update time:is correct in the Edge browserEnvironment
Additional Information