Live data from Hacker News

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

chromestory.com

191–200 of 332 posts

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

#191
post #177

Earlier quoted context omitted.

> It's a simple way of making it impossible to see the actual Referer to external website It's about tracking outbound links, not about masking the referrer. As already mentioned, there are standard ways for that.

Tracking can be done in JS via onclick event also. What makes you so sure it's not about masking referrer?

Because I've done tracking like that for several years, lots of services are still doing it this way and because rel="noopener" or rel="noreferrer" is the way to go if you want to mask the referrer. Even Google recommends to do it that way[0].

If you are not using it for tracking, there is no point in doing it like this after all.

[0] https://developers.google.com/web/tools/lighthouse/audits/no...

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

#192
post #80

Real use case for this is so Google can poke into context for links shared via services they have no ownership. They got used to know exactly what people share and, much more importantly, what people click on email, thanks to gmail rewriting all links to a google track url (while misleading the user by a fake status text on mouse over). When they sum the info of 1. who send it, 2. who clicked on it, 3. what was the e…

> Or, we could just go with occam's razor and believe that a bunch of bored engineers at google decided to simply add a feature completely disconnected from any of their business plans I understand the skepticism about Google's motivations but "making Chrome better and more feature rich so people will want to use it" is completely in line with Google's business plans.

I believe you. That's what the fine folks at the IE team did with ajax too, for example. And I am not being ironic, but the line is so thin that I have to point it out either way.

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

#193
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 should only cause a problem for pages using “targetText” as an anchor or id where someone would link to “page#targetText”

I would expect that it’s possible for both to work since Chrome’s hack requires the equal sign and its parameters. So with no equal, works as spec. With equal works with hack (that will likely make it into spec).

Even when a page has the targetText anchor and receives the text link param, I think the desired user behavior is to link to the text, not the anchor.

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

#194
post #71

Earlier quoted context omitted.

amp is a self serving standard. Nowhere in the standard "higher search ranking on google inc" is mentioned as a must have feature. Yet it is the only feature anyone care about when discussing adoption.

If that were true (and I'm not so sure it is), then you'd blame the search team for letting it be a ranking factor. It has nothing to do with web standards.

You are not wrong (about what is on the standards). But you are being downvoted because everyone who did implement AMP in the real world, did so for the SEO benefits.

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

#195
post #184

Earlier quoted context omitted.

you constantly see pages with #targetText=blah fragments?

I think he means it the other way around. You have a Single page application with routing based on #someRoute, then someone tries to share some link with the #targetText=... which will lead to an invalid route. Or am I missunderstanding something?

You’re thinking of ?targetText= or &targetText=

Hash isn’t used for query parameters.

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

#196

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…

I'm so glad that google just sometimes ignores W3C's horrible design-by-committe nonsense. Its the same reason XHTML failed. #selector(type=TextQuoteSelector,exact=foo) vs. #targetText=foo /edited to be a more fair comparison

Yeah.. I remember Microsoft once thought it would be great to not follow standards. What we got is Internet Explorer.

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

#197
This is indeed very useful feature to share specific content. I built larynx 'A tool to share content along with voice' with similar intention. In larynx a user can share screenshot of the particular snippet along with voice.

I wanted to build a similar future in the feature where clicking the link would take the user directly to the snippet, of-course it would work only inside larynx apps; but with chromium penetration Google can implement this feature seamlessly.

[1]: https://larynx.io

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

#198

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…

Not saying its the best one but I built a system we used on the NYTimes web site for awhile that was fault tolerant and adjusted to changes in the page:

https://github.com/NYTimes/Emphasis

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

#200
post #184

Earlier quoted context omitted.

I think he means it the other way around. You have a Single page application with routing based on #someRoute, then someone tries to share some link with the #targetText=... which will lead to an invalid route. Or am I missunderstanding something?

You’re thinking of ?targetText= or &targetText= Hash isn’t used for query parameters.

Not for query parameters sent to the remote server, but there are definitely pages/applications that store state in the hash.

For example, look at the URLs used by mega.nz, or any encrypted pastebin (they store the decryption key in the hash so it's not sent to the server).

Post reply on HN