Skip to content

Commit

Permalink
Add section on link lifetime (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
bokand authored Dec 13, 2023
1 parent d88512f commit 37deefa
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
19 changes: 18 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,31 @@ 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.
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}
Expand Down
16 changes: 15 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,7 @@ <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
<li><a href="#web-text-references"><span class="secno">2.1.1</span> <span class="content">Web text references</span></a>
<li><a href="#user-sharing"><span class="secno">2.1.2</span> <span class="content">User sharing</span></a>
</ol>
<li><a href="#link-lifetime"><span class="secno">2.2</span> <span class="content">Link Lifetime</span></a>
</ol>
<li>
<a href="#description"><span class="secno">3</span> <span class="content">Description</span></a>
Expand Down Expand Up @@ -958,13 +959,26 @@ <h4 class="heading settled" data-level="2.1.1" id="web-text-references"><span cl
URLs that direct the user to the answer they are looking for in the page rather
than linking to the top of the page.
<h4 class="heading settled" data-level="2.1.2" id="user-sharing"><span class="secno">2.1.2. </span><span class="content">User sharing</span><a class="self-link" href="#user-sharing"></a></h4>
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.
<h3 class="heading settled" data-level="2.2" id="link-lifetime"><span class="secno">2.2. </span><span class="content">Link Lifetime</span><a class="self-link" href="#link-lifetime"></a></h3>
<p>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.</p>
<p>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.</p>
<p>See <a href="#generating-text-fragment-directives">§ 4 Generating Text Fragment Directives</a> for best practices on how to create robust text
directive links.</p>
<h2 class="heading settled" data-level="3" id="description"><span class="secno">3. </span><span class="content">Description</span><a class="self-link" href="#description"></a></h2>
<h3 class="heading settled" data-level="3.1" id="indication"><span class="secno">3.1. </span><span class="content">Indication</span><a class="self-link" href="#indication"></a></h3>
<div class="note" role="note">This section is non-normative</div>
Expand Down

0 comments on commit 37deefa

Please sign in to comment.