Live data from Hacker News

Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

chromestory.com

271–280 of 332 posts

Re: Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

#271

Earlier quoted context omitted.

Gmail was probably the first very-widely-used app that used the fragment for navigation, and Google drove the whole #! thing. That technique is now considered obsolete, with the History API (history.pushState and all that lot) having supplanted it. IE9 is the most popular browser currently in use that doesn’t support it; there are still definitely some systems out there that will use the History API if it’s available…

pushState is bad for many use cases because it completely breaks linking.

It doesn't have to, if you also provide routes on the backend so that pushState URLs actually resolve to a real URL that serves the same content. Or just provide a wildcard route and use JS to detect the URL like you would with hash-based navigation.

It does require more coordination between the front and back-end though.

Re: Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

#272
post #267
post #109

Technical question, apart from the (valid IMO) political arguments: Google's idea to implement this is to append the text fragment to the URL in a "#targetText" pseudo-query-argument in the URL fragment part. This sounds like it would extremely easily break existing web pages who use the fragment part for their own state. In the blog post, there doesn't seem to be anything addressing this (or even just specifying how…

Feature author here. I'd like to first clarify that this is still in the super-early stage of development; none of this is shipped or finalized yet. The feature hasn't even requested approval to ship at which point these kinds of issues would be brought up. We take web-compat very seriously. If this breaks even a small percentage of pages, it won't ship. Part of the shipping process is ensuring we have at least a dra…

Why is this not being pushed to become part of the web spec first? That seems more reasonable than pushing a feature with the possibility of breaking pages that are spec compliant.

Re: Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

#273

Earlier quoted context omitted.

sure, it was state of the art back in the day, but state of the art over time depreciates to technical debt, and the ones that are left using what was once state of the art are now poorly written.

> and the ones that are left using what was once state of the art are now poorly written. They could just be perfectly written (for their time), just legacy and not updated, is my distinction.

at some point the accretion of legacy and not fixing issues to match better understanding turns a perfectly written for its time application into a poorly written application for the present.

Re: Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

#274

Earlier quoted context omitted.

sure, it was state of the art back in the day, but state of the art over time depreciates to technical debt, and the ones that are left using what was once state of the art are now poorly written.

That doesn't give Google the right to break all those sites though.

right, I guess I should have indicated sarcasm on the I guess it's their fault part.

Re: Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

#275
post #267

Earlier quoted context omitted.

Feature author here. I'd like to first clarify that this is still in the super-early stage of development; none of this is shipped or finalized yet. The feature hasn't even requested approval to ship at which point these kinds of issues would be brought up. We take web-compat very seriously. If this breaks even a small percentage of pages, it won't ship. Part of the shipping process is ensuring we have at least a dra…

Why is this not being pushed to become part of the web spec first? That seems more reasonable than pushing a feature with the possibility of breaking pages that are spec compliant.

This is my only gripe. Please work with a spec first, so that the feature flows naturally through to other vendors. Especially because it's changing the way URLs work.

You're going to get people generating millions of these links around the web. That's a long term legacy of hyperlinks generated by the citizens of the web. Although the fallback is obviously pretty harmless, what about a future feature? If this doesn't work out, but some other feature down the line does, suddenly thousands of these links start working in weird ways. Or worse, the feature doesn't happen at all, because of the legacy of broken links. I know that's pessimistic, but URLs are the foundation of the web, changing how they work should be funneled through the spec.

Re: Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

#276
post #267

Earlier quoted context omitted.

Feature author here. I'd like to first clarify that this is still in the super-early stage of development; none of this is shipped or finalized yet. The feature hasn't even requested approval to ship at which point these kinds of issues would be brought up. We take web-compat very seriously. If this breaks even a small percentage of pages, it won't ship. Part of the shipping process is ensuring we have at least a dra…

Why is this not being pushed to become part of the web spec first? That seems more reasonable than pushing a feature with the possibility of breaking pages that are spec compliant.

It will. The specification process needs to be informed by implementation and experimentation. When implementing a feature we'll learn all sorts of things and hit bumps that will help guide the design. Once we have a working implementation, it helps to be able to use it to answer things like:

- How does this perform on existing pages - How does this feel from a user perspective - How can I write pages that user this

Specification-up-front is very theoretical in the absence of an implementation. IMHO, where it's (rarely) happened in practice, the specification is often unimplemented. The value of a specification is that it allows other browser vendors to add an interoperable implementation.

Again, I'd like to stress, this is in the very early-stage experimental phase. We aren't dropping a feature that'll break the existing web.

Edit: To clarify, "implementation" does not necessarily mean shipped to users.

Re: Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

#277
post #109

Technical question, apart from the (valid IMO) political arguments: Google's idea to implement this is to append the text fragment to the URL in a "#targetText" pseudo-query-argument in the URL fragment part. This sounds like it would extremely easily break existing web pages who use the fragment part for their own state. In the blog post, there doesn't seem to be anything addressing this (or even just specifying how…

> It's an abuse of the purpose of URL fragments

Would you just look at who's preaching... If it ain't the same Google that all but standardized the use of #! contraption in the pre-HTML5 days - "you don't use, we don't crawl it" kinda thing.

This is an abuse alright, but a better choice of wording might've been appropriate.

Re: Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

#279
post #173

I would like to urge the browser developers/makers to adopt existing proposals which came through open consensus which do precisely cover the same use cases (and more!) W3C Reference Note on Selectors and States: https://www.w3.org/TR/selectors-states/ It is part of the suite of specs that came through the W3C Web Annotation Working Group: https://www.w3.org/annotation/ More examples in W3C Note Embedding Web Annotat…

Are there any guidelines for chromium development? It seems like one can just commit a feature to it and make half the world use it. Regarding URL hash abuse elsewhere: this current development in Chromium is different from front-end frameworks and specific websites doing it because SomeSite can't break OtherSite while both having a different way to handle the hash. Now Chromium randomly claims part of the hash which…

Explanation:

> ... and make half the world use it.

vs.

> Add about:flag for Scroll-To-Text

> Adding chrome://flag to allow users (particularly on Mobile) to easily enable and test the feature.

(Commit message via https://chromium-review.googlesource.com/c/chromium/src/+/14...)

So nobody will use the feature unless they explicitly choose to.

Re: Chrome will Soon Let You Share Links to a Specific Word or Sentence on a Page

#280
post #109

Technical question, apart from the (valid IMO) political arguments: Google's idea to implement this is to append the text fragment to the URL in a "#targetText" pseudo-query-argument in the URL fragment part. This sounds like it would extremely easily break existing web pages who use the fragment part for their own state. In the blog post, there doesn't seem to be anything addressing this (or even just specifying how…

> It's an abuse of the purpose of URL fragments So what they're saying is, they expect a clash of their abuse of URL fragments with others' abuse of URL fragmentsto be rare because... The arrogance here is astounding: "It's OK for us to use this, because others shouldn't be using it"

It's another story point in the tale of how Google shaped the neo-modern web.

Google's influence is massive, anyone wanting to build a profitable website needs to bend to their standards of performance and structure.

Normally this was a general push in the right direction for everyone. With how they've been handling AMP however, part of me wonders if they're not trying to build a feature moat around the web itself. Although misguided use of their power by individual product-managers is probably the less sinister, more likely reason.

Post reply on HN