Giter Site home page Giter Site logo

Comments (6)

kevinmarks avatar kevinmarks commented on August 23, 2024 2

This is a mistaken objection. The text of a page is far more resilient than the structure as templates are changed often. More importantly, the goal of linking is most often to refer to a particular piece of text, not some page structure. By embedding the text in the link this makes it more resilient, not less as the intent of the linker is clearer.
See how to present links as quotes as an example.

from scroll-to-text-fragment.

tilgovi avatar tilgovi commented on August 23, 2024 2

We should not forget that the use cases are potentially different. If the intention is to link to a publisher-provided identifier then the publisher can make those identifiers known, e.g. when GitHub sets the fragment to match the line you click in a file view.

Linking to text provides something the publisher has not specifically identified. That puts power in the hands of the content consumer. While it may be fragile, it's not something a consumer can do at all now.

This is not a choice between two alternatives.

Let's also keep in mind that just because "rot" might have negative connotations, link rot is not "bad", per se. The web relies upon the fragility of reference. A link might break, but the page containing it does not. When you convey a reference, you are conveying it with all its fragility and that's okay.

from scroll-to-text-fragment.

bokand avatar bokand commented on August 23, 2024 1

I tend to agree with the rationales above, mainly:

  1. Including the text in the link means the text can be surfaced to the user, even if it no longer appears in the page.
  2. This provides some additional context - in the worst case, we fallback to existing behavior so it's strictly not-worse.

The discussion was useful but I'm doing a clean-up pass over issues so I'm going to close this as there's nothing actionable here.

from scroll-to-text-fragment.

bokand avatar bokand commented on August 23, 2024

In addition to @kevinmarks' point above, the updated proposal now supports adding context snippets which can prevent the given example ("the lazy dog has a brown coat, and it looks just like a brown fox").

from scroll-to-text-fragment.

ylebre avatar ylebre commented on August 23, 2024

I think adding context could help make more specific links, but that would also make the links even more brittle as they now depend on other pieces as well. The proposal should work fine on immutable content, but content behind a URL can be modified over time. The original author does not know that their content is being linked this way, so they can't redirect the faulty link to the new location of the original content.

from scroll-to-text-fragment.

bokand avatar bokand commented on August 23, 2024

Sure, but presumably if the content moves, the page can redirect. Perhaps we can make the fragment survive a 302 in which case everything world work. Otherwise the user simply gets to the targetted resource without the targetText which is the current status quo.

Content behind a link can already change - at least with this proposal, we could surface the fact that the referenced text no longer exists on the page. In the worst case, we get today's behavior of simply navigating to the stale content. I fail to see how this makes anything worse...

from scroll-to-text-fragment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.