hypothesis / hypothesis/product-backlog

Allow publishers to inform Hypothesis about permanent URL changes for content

Open
#203 20 comments 1 reaction 0 assignees View on GitHub
API document equivalence feature request h
Dominant language
No language data
Stars
122
Forks
7
PR merge metrics
No merged PRs in 30d

Description

## Feature Request Form

### Problem you are trying to address with this feature

A publisher moves content from one URL (say `/articles/foo`) to another (say `/foo`) and wants annotations made on the original URL to appear on the new URL.

We don't provide clear documentation for publishers on how to achieve this. Hypothesis does support using canonical links to 'teach' the service about the equivalence of different URLs, but it doesn't solve this problem.

### Your solution

There is a standard mechanism in the web to inform search engines and browsers about the move if they encounter the old link - an HTTP redirect. Perhaps we can leverage this, at least for publicly accessible web pages:

1. Publisher moves content from URL A to URL B
2. Publisher sets up a 3xx redirect from URL A to URL B
3. Publisher submits URL A to a web-based interface or a Hypothesis API endpoint. Hypothesis then performs a HEAD request against each URL and if it returns a redirect, records a URL equivalence between URL A and URL B.

Why require a redirect instead of just allowing the publisher to submit equivalences directly? It provides proof that the redirect is valid - ie. that URL A really does redirect to URL B.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the proposed web-based interface or Hypothesis API endpoint described in the issue. Review how a HEAD request would validate a 3xx redirect from URL A to URL B, then define what a completed URL-equivalence submission should demonstrate.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.