Treatment of links to previous comments in the same thread. May 24, 2010 9:22 AM   Subscribe

Have you guys considered checking submitted comments/answers for links to previous comments/answers (via a number/hash sign fragment identifier ) in the same thread, and converting such instances to links that would instantly "jump" to the comment rather than reload the entire page? In addition to increased convenience for readers, I suspect such a change might significantly decrease service costs for large threads (like the recent MetaTalk thread approaching 1500 comments).
posted by The Confessor to Feature Requests at 9:22 AM (33 comments total)

That's an interesting idea, moving them to relative links instead of absolute ones.
posted by jessamyn (staff) at 9:23 AM on May 24, 2010


I think this is mostly browser behavior, no? I swear most times I don't see a page reload in Chrome.
posted by mathowie (staff) at 9:24 AM on May 24, 2010 [1 favorite]


hmm, I'm not sure what you're describing here. Can you describe what the feature might look like on the page?
posted by pb (staff) at 9:25 AM on May 24, 2010


pb, he is describing clicking on this link to the first comment here. Did your browser jump to it, or did it load a new version of the page to jump there?
posted by mathowie (staff) at 9:27 AM on May 24, 2010


Well if you were commenting saying "I agree with what jessamyn is saying" right now adding the link puts in the full URL

http://metatalk.metafilter.com/19322/Treatment-of-links-to-previous-comments-in-the-same-thread#776363

whereas if there was a script or something that said "hey this is linking to a comment in this thread, it could make the link into

#776363

instead which, on some browsers, would make it just hop up the thread, not reload the entire thing. I've been having this problem in the monster threads on firefox, clicking a link that goes to a previous comment reloads the entire thread just to go back up in the same thread.
posted by jessamyn (staff) at 9:28 AM on May 24, 2010


Fake's comment here contains a link to a previous comment in the same thread. Clicking on the link (in Chrome) reloads the entire thread in a separate tab.
posted by The Confessor at 9:30 AM on May 24, 2010


It doesn't reload the entire thread for me—it jumps within the page. Do you have any Chrome extensions that could be forcing a refresh?
posted by pb (staff) at 9:32 AM on May 24, 2010


Firefox only reloads if the slug or some other part of the url before the hash changes.

Are there any good quoting userscripts, by the way?
posted by Tobu at 9:32 AM on May 24, 2010


Clicking on the link (in Chrome) reloads the entire thread in a separate tab

The "new tab" part is tripping me up here. Do you have links on MeFi set to open in new windows? Did you use a key modifier to load into a new tab instead of the current window? Extensions?

If you're loading a thread into a new tab, there's no possible way to not get it to load a new copy of the thread, since it has to do that to open a new tab. In the same window, links should just jump up like they do here for me.
posted by mathowie (staff) at 9:34 AM on May 24, 2010


In firefox it just jumps up the page, no reload.
posted by stupidsexyFlanders at 9:34 AM on May 24, 2010


Given the way GMail, GReader and the like rely on fragments after the hash, I think most browsers should behave like firefox. The problem is probably that the slug changed when the thread was linked from some other website.
posted by Tobu at 9:36 AM on May 24, 2010


Tobu: "Firefox only reloads if the slug or some other part of the url before the hash changes.

Are there any good quoting userscripts, by the way
"

I'm using this one.
posted by stupidsexyFlanders at 9:36 AM on May 24, 2010


Thanks. Maybe it should be using the #fragment-url instead.</OCD>
posted by Tobu at 9:41 AM on May 24, 2010


Disregard.

I had the "open links in new window" preference set in my profile, and was under the impression it was compulsory, rather than an option.
posted by The Confessor at 9:43 AM on May 24, 2010


(I didn't realize there was an option for it, in other words. I apologize for starting this thread.)
posted by The Confessor at 9:44 AM on May 24, 2010


I'd suggest different treatment for in-thread links, or at least an option for such in user preferences, but I suspect that in practice it would prove too confusing unless such links were set off with special formatting.
posted by The Confessor at 9:50 AM on May 24, 2010 [1 favorite]


I also have the "open in new window" option set, and it is very useful as I'm on a trackpad so opening in a new tab is a pain. However, opening links with Metafilter itself in a new tab is not so necessary - would it be possible, with this option checked, to diffentiate between internal links (open stay in the same window) and external ones (open in new tab/window)?

On preview, what The Confessor just said.
posted by jontyjago at 9:52 AM on May 24, 2010


I don't think the problem this solves is widespread enough to warrant the extra headaches involved with implementing it. One option is to add a target="_self" to all links that are pointing to something within the page. That means checking every comment for links on building the page, parsing the links, and inserting that attribute.

It might be possible to add the attribute with JavaScript on pageload though. That would remove the parsing/server-load headaches. I'm guessing there are some folks with "open in new window" enabled that really do want all links to open in a new window, even internal links. If we could get some consensus on that, it might work to add the attribute automatically.
posted by pb (staff) at 10:02 AM on May 24, 2010


I'm in agreement with jontyjago & The Confessor i on this one, I think its open external links in a new window that's the desired behaviour.

While we are riding this particular pony it is worth pointing out that this behaviour is already inconsistent in as much as its only user generated links that open in a new window; clicking on a username, say, or the preferences link, opens that page in the same window.
posted by tallus at 10:45 AM on May 24, 2010


We only open links within comments or posts in new windows, all over links on the site are internal and open in the same window. That said, and as pb said, it'd be a pain to have to filter through every comment and post looking for the rare internal links to MetaFilter servers and serve that up in the default window instead of a new one.
posted by mathowie (staff) at 10:46 AM on May 24, 2010


yeah, maybe this is one of those times it's better to ask forgiveness than build consensus. I went ahead and added a bit of JavaScript that will give internal links a target of _self. The only catch is that the linked URL has to match the site URL exactly. If the slug is off, or if the commenter is using non-standard link-building, this script won't catch it.
posted by pb (staff) at 11:11 AM on May 24, 2010


I have always wondered about this too. That is, why clicking on the timestamp of a post scrolls the page but an internal link would open in a new window.

I am on Camino by the way.
posted by vacapinta at 11:14 AM on May 24, 2010


The timestamp is a link that is within our control, and links within comments are not. So we know that a timestamp is an "internal" link ahead of time so we can treat it differently. Links that users add could go anywhere, and there's no instructions that users should treat internal links differently.

The code I just added should help.
posted by pb (staff) at 11:17 AM on May 24, 2010 [1 favorite]


Umm..except that now it works differently! Cool!
posted by vacapinta at 11:19 AM on May 24, 2010


Thank you, pb; I wouldn't even have mentioned the possibility if I hadn't remembered that amazon.com links are already parsed and reformulated to ensure nobody surreptitiously uses metafilter as a revenue-generating tool.
posted by The Confessor at 11:23 AM on May 24, 2010


pb / matt - that seems to work exactly as I would like - thank you.
posted by jontyjago at 11:49 AM on May 24, 2010


Maybe this is a good place to bring up this...

On this page: http://www.metafilter.com/home/popularfavorites (and the same page for ask), the "(7 days, 30 days, all time)" links all open a new window for me. I have the "Open links in new windows?" pref checked, but as those are internal links I expect them to just load in the current window. Using the "plain" theme, if that matters.
posted by ericost at 1:34 PM on May 24, 2010


Thanks ericost, should be fixed.
posted by pb (staff) at 1:51 PM on May 24, 2010


I also have the "open in new window" option set, and it is very useful as I'm on a trackpad so opening in a new tab is a pain.


CTRL + click will do what you want. No middle-or-right clicking necessary.
posted by chrisamiller at 2:48 PM on May 24, 2010


thanks!
posted by ericost at 4:28 PM on May 24, 2010


I don't know whether your code already handles different pages but note that these sorts of links will sometimes be viewed through places like "Recent Activity" where they'll need to load the full thread page when clicked.
posted by XMLicious at 8:54 PM on May 24, 2010


Yep, the targets are only changed on thread pages. Thanks for the reminder though, that's a good point.
posted by pb (staff) at 7:36 AM on May 25, 2010


tallus: "I'm in agreement with jontyjago & The Confessor i on this one"

I just hovered over that italicised 'i' for an embarrassingly long time waiting for the little infobox to pop up saying 'Married to [Mefite]', 'Sockpuppet of [Person]' or 'Expert on [Subject]'.
posted by the latin mouse at 1:15 AM on May 26, 2010


« Older Anybody here in Budapest?   |   For the Love of loquacious Newer »

You are not logged in, either login or create an account to post comments