Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When will support local HTML? #803

Open
dutry opened this issue Feb 21, 2022 · 2 comments
Open

When will support local HTML? #803

dutry opened this issue Feb 21, 2022 · 2 comments

Comments

@dutry
Copy link

dutry commented Feb 21, 2022

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

When will Hypothes.is support HTML?

Best.

@robertknight
Copy link
Member

robertknight commented Feb 22, 2022

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.

@venkate123
Copy link

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants