browser-extension icon indicating copy to clipboard operation
browser-extension copied to clipboard

When will support local HTML?

Open dutry opened this issue 3 years ago • 2 comments

Nowadays HTML is also a nice format for saving and sharing files, much easier than before.

When will Hypothes.is support HTML?

Best.

dutry avatar Feb 21 '22 13:02 dutry

The main issue with local HTML files is identifying the document in a way that works if the file is renamed or copied. For PDF files the client uses the PDF's fingerprint / file ID for this purpose.

For regular remote HTML pages we use the https://... URL, plus any embedded identifiers that we can find in <link> or <meta> elements in the page. This issue does affect regular web pages already, as changing the URL will break the link to existing annotations if no additional identifiers were found. I believe the thinking when this was last looked at was that it was more of a problem that renaming a local file broke annotation links, since that is an easier mistake for users to make. As a result, the Hypothesis extension currently blocks injection into local HTML files.

The Hypothesis bookmarklet does actually work with local HTML files in Chrome, but you should be aware of this issue with renaming files. One way to avoid it is to put a <link rel="canonical" href="..."> tag in the local HTML file where the href is a URI or URL that will serve as a key for annotations to be associated with. This doesn't have to be a working HTTPS URL, it just has to be something unique to the document.

robertknight avatar Feb 22 '22 08:02 robertknight

@robertknight I tried to apply Hypothesis bookmarklet on local html. But after I click bookmarklet there was nothing changed. Could you teach me how to make it work? Thank you so much!

venkate123 avatar May 06 '22 04:05 venkate123