From 37deefab2bd73cabd4b905df12a66148a1784f21 Mon Sep 17 00:00:00 2001 From: David Bokan Date: Wed, 13 Dec 2023 16:50:19 -0500 Subject: [PATCH] Add section on link lifetime (#248) --- index.bs | 19 ++++++++++++++++++- index.html | 16 +++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 3e06d4e..c3726c6 100644 --- a/index.bs +++ b/index.bs @@ -99,7 +99,7 @@ URLs that direct the user to the answer they are looking for in the page rather than linking to the top of the page. ### User sharing ### {#user-sharing} -With text fragments, browsers may implement an option to 'Copy URL to here' +With text directives, browsers may implement an option to 'Copy URL to here' when the user opens the context menu on a text selection. The browser can then generate a URL with the text selection appropriately specified, and the recipient of the URL will have the specified text conveniently indicated. @@ -107,6 +107,23 @@ Without text fragments, if a user wants to share a passage of text from a page, they would likely just copy and paste the passage, in which case the receiver loses the context of the page. +## Link Lifetime ## {#link-lifetime} + +This specification attempts to maximize the useful lifetime of text directive links, for example, by +using the actual text content as the URL payload, and allowing a fallback element-id fragment. +However, pages on the web often update and change their content. As such, links like this may "rot" +in that the text content they point to no longer exists on the destination page. + +Text directive links can be useful despite this problem. In user sharing use cases, the link is +often transient, intended to be used only within a short time of sending. For longer duration use +cases, such as references and web page links, text directives are still valuable since they degrade +gracefully into an ordinary link. Additionally, the presence of a stale text directive can be useful +information to surface to a user, to help them understand the link creator's original intent and +that the page content may have changed since the link was created. + +See [[#generating-text-fragment-directives]] for best practices on how to create robust text +directive links. + # Description # {#description} ## Indication ## {#indication} diff --git a/index.html b/index.html index 8dd104b..eddaf6b 100644 --- a/index.html +++ b/index.html @@ -865,6 +865,7 @@

Table of Contents

  • 2.1.1 Web text references
  • 2.1.2 User sharing +
  • 2.2 Link Lifetime
  • 3 Description @@ -958,13 +959,26 @@

    2.1.2. User sharing

    - With text fragments, browsers may implement an option to 'Copy URL to here' + With text directives, browsers may implement an option to 'Copy URL to here' when the user opens the context menu on a text selection. The browser can then generate a URL with the text selection appropriately specified, and the recipient of the URL will have the specified text conveniently indicated. Without text fragments, if a user wants to share a passage of text from a page, they would likely just copy and paste the passage, in which case the receiver loses the context of the page. + +

    This specification attempts to maximize the useful lifetime of text directive links, for example, by +using the actual text content as the URL payload, and allowing a fallback element-id fragment. +However, pages on the web often update and change their content. As such, links like this may "rot" +in that the text content they point to no longer exists on the destination page.

    +

    Text directive links can be useful despite this problem. In user sharing use cases, the link is +often transient, intended to be used only within a short time of sending. For longer duration use +cases, such as references and web page links, text directives are still valuable since they degrade +gracefully into an ordinary link. Additionally, the presence of a stale text directive can be useful +information to surface to a user, to help them understand the link creator’s original intent and +that the page content may have changed since the link was created.

    +

    See § 4 Generating Text Fragment Directives for best practices on how to create robust text +directive links.

    3. Description

    3.1. Indication

    This section is non-normative