Live data from Hacker News

NYTimes Opensources Their Deep Linking JS

open.blogs.nytimes.com

11–20 of 56 posts

Re: NYTimes Opensources Their Deep Linking JS

#12
post #5

On Github, they say they'll eventually remove the dependency on PrototypeJS. The library is only ~10k now, hopefully that change won't increase the size too much.

You know what I would love to have the HTML5 guys add to the spec? Some way of keeping libraries like PrototypeJS and jQuery in the browser cache at all times, so that pages could just use them without worrying about the size. Perhaps some kind of alternate src attribute on script tags, so you could list a local copy (for reliability) as well as Google and Microsoft CDN URLs, and the browser would go with the first o…

Why isn't it sufficient to use the Google-hosted jQuery? It's likely to be cached.

Re: NYTimes Opensources Their Deep Linking JS

#14
I played around with this and got it so you can both highlight and have it move the view to the paragraph of choice. Seems pretty interesting.

An issue with it though, when sending the link to someone, and then they click it, browsers (Chrome here) turn the #h[TArTWw,1] into #h%5BTArTWw,1%5D which then seems to be ignored by the script.

Re: NYTimes Opensources Their Deep Linking JS

#15
Awesome, they just invented a small part of Ted Nelson's Xanadu project. Say what you will about Xanadu being vapour-ware but at least Mr Nelson designed it properly to handle problems like deep-linking and track-backs which the Web has to employ workarounds for.

Re: NYTimes Opensources Their Deep Linking JS

#16
post #5

Earlier quoted context omitted.

You know what I would love to have the HTML5 guys add to the spec? Some way of keeping libraries like PrototypeJS and jQuery in the browser cache at all times, so that pages could just use them without worrying about the size. Perhaps some kind of alternate src attribute on script tags, so you could list a local copy (for reliability) as well as Google and Microsoft CDN URLs, and the browser would go with the first o…

Why isn't it sufficient to use the Google-hosted jQuery? It's likely to be cached.

1. a boatload of page view info you are sending off to google

2. it's another dependency that you don't control

Re: NYTimes Opensources Their Deep Linking JS

#17
post #14

I played around with this and got it so you can both highlight and have it move the view to the paragraph of choice. Seems pretty interesting. An issue with it though, when sending the link to someone, and then they click it, browsers (Chrome here) turn the #h[TArTWw,1] into #h%5BTArTWw,1%5D which then seems to be ignored by the script.

I noticed that just now too. I'll investigate and see if I can get a fix in the next update.

Re: NYTimes Opensources Their Deep Linking JS

#18
post #6

I don't understand what's so awesome about this? Browsers have supported deep linking since forever. You can link to any specific id on a page and the browser will scroll to it when you open the page. For example, I could have every paragraph an id say id="p5" and then link ad example.com/story#p5 and voila, deep linking. Hoorah for reinventing the wheel :)

RTFM? :) The difference is no 'href' tags. The 'tag' is automatically created based on the words in the paragraph, via Javascript, and decoded appropriately. It is also slightly neat in that you can highlight a specific sentence (multiple sentences actually, see the little tutorial at the bottom). I actually kind of like it, it would be a neat way to really highlight what you think is interesting in an article when s…

I thought about a plugin but then you are maintaining several and handling issues from readers who hits walls installed or uninstalling it...

My hope tis that this approach is equally unhelpful to everyone :)

Seriously, my hope is that if an approach like this is going to happen that we can keep the usage (syntax) consistent.

Further down the road I'd like the view to also show you what people in your network have highlighted, or on a more aggregate and subtle level, what everyone has...

Post reply on HN