The problem nobody notices until it hurts
You highlight three paragraphs in a long article, add notes, and close the tab. A week later you come back — the page has been lightly edited, a banner was inserted near the top, and your highlights are either gone or painted over the wrong sentences.
Most highlighters store a highlight as a pair of character offsets, or as an XPath plus offsets. Both break the moment anything above the highlight changes length. Insert one paragraph and every offset after it points at the wrong text.
Store the quote, not the position
Highlighter (a local-first Edge extension I just shipped) stores each highlight the way the W3C Web Annotation model suggests:
- the quoted text itself
- a short snippet of surrounding context (prefix/suffix)
- the note and color
On revisit, it searches the page for the quote. If the quote appears more than once, the stored context disambiguates which occurrence you meant. No offsets to drift, no XPath to break when a wrapper <div> appears.
The honest part: sometimes it still can't find it
If the page's wording changed substantially, no text-matching trick will locate the original passage — and pretending otherwise would be dishonest. So a highlight that cannot be located is never silently dropped:
- it stays in the side panel, marked "not found"
- you can re-locate it by hand: select the text on the page and click Bind
That one design rule — degrade visibly, never lose data silently — shaped most of the implementation.
Two more things that had to work
Weava import. A lot of people arrive with years of highlights in Weava (which has been unmaintained for a while). The importer shows a preview first — per-page counts, duplicate and unusable-row tallies — before writing anything. Imported highlights re-anchor when you open the page: exact match first, then a conservative fuzzy match (case/punctuation differences only, unique hits only).
Export is not a feature, it's the exit door. JSON / CSV / Markdown export at any time. Everything lives in chrome.storage.local; there is no server, no account, no analytics. If the extension vanished tomorrow, your data would still be yours.
Limits, stated plainly
- No PDF highlighting in this version.
- It can't run on browser-internal pages (
chrome://,edge://) or extension stores. - Re-anchoring is text matching, not magic: heavy rewrites may need a manual Bind.
It's live on Microsoft Edge Add-ons (free, no in-app purchases in this version):
https://microsoftedge.microsoft.com/addons/detail/highlighter/ooocjgnapglfljdgojdoacjdedpaplhe
If you try it and an anchor fails on a real page, I'd rather hear about that page than get a star.
Top comments (0)