3

See the two comments below for an example. The first comment has the title of the linked question in the tooltip, but the second link does not.

8
  • 1
    You mean like one of these? - meta.stackexchange.com/questions/82146/…
    – jjnguy
    Commented Mar 8, 2011 at 13:39
  • 1
    Or one of these? meta.stackexchange.com/q/82146/2598
    – jjnguy
    Commented Mar 8, 2011 at 13:39
  • 1
    (I think I see what you mean)
    – jjnguy
    Commented Mar 8, 2011 at 13:40
  • I like this except for one case -- I use the short links sometimes in situations where I'm linking to a deleted question and I specifically don't want to reveal the title. If that isn't a significant enough case to not do this for deleted questions, I think I'd be okay with that.
    – Jon Seigel
    Commented Mar 8, 2011 at 17:54
  • 1
    @Jon, but then just leave the title out: the tooltip is really based on whatever one types. It's NOT the actual title of the post one is linking to. Like: meta.stackexchange.com/questions/82146/…
    – Arjan
    Commented Mar 8, 2011 at 18:54
  • @Jon Even if you use that, clicking on the link will redirect you to a version that has the slug, even if you don't have permission to view deleted questions. They won't be able to see the content, but the title will be just as visible in the end.
    – Grace Note StaffMod
    Commented Mar 8, 2011 at 19:11
  • @Grace, I never knew that, but you're very right, and it also applies to the full blown /questions/ URL: meta.stackexchange.com/questions/45118/… (which you can see, being 10k+, but I cannot).
    – Arjan
    Commented Mar 8, 2011 at 19:54
  • Well, withdrawing my objection since I'm clearly inobservant. lol thanks guys.
    – Jon Seigel
    Commented Mar 9, 2011 at 8:57

1 Answer 1

1

The tooltip is simply created from the URL. The short link being as short as possible, there's currently not enough information to create the title attribute.

See the comments below in action, which use:

/questions/82146/also-let-shortlinks-in-comments-have-a-tooltip-with-the-question-title
/questions/82146/this-is-this-very-question-but-not-the-real-title

That aside: I really don't see why folks would use the short links on these sites themselves. I actually think many don't know that these are referral links (which are only useful when used on third-party sites) and accidentally use those rather than the long links...

8
  • 1
    Hover and see the title attribute as the tooltip: meta.stackexchange.com/questions/82146/… and meta.stackexchange.com/questions/82146/…
    – Arjan
    Commented Mar 8, 2011 at 18:57
  • I suppose it would be an easy, yet time consuming, call to the API for each link to get the title of the question.
    – jjnguy
    Commented Mar 8, 2011 at 19:11
  • I think some people equally use them not because they are unaware, but they are fully aware and expect that it can contribute towards the publicity badges. Also, short links probably allow people to fit more links, given the character limit.
    – Grace Note StaffMod
    Commented Mar 8, 2011 at 19:12
  • 1
    @jjnguy, I guess you're right about performance; for some reason automatic titles for plain links in normal posts are also determined when a post is saved, not when it's rendered. (And hence the automatic title does not reflect later changes, unless the referring post is edited after the change.) But: I'm just assuming this.
    – Arjan
    Commented Mar 8, 2011 at 19:59
  • 1
    Some changes were made about the automatic titles, actually (courtesy balpha, though I see you already knew that). The editor preview now does render the title, and recently it was updated to no longer render HTML as HTML. I don't have a sample of a scenario of when a title has changed since the posting, though, so I don't know if it updates for that yet. But it's not entirely at post submission anymore, at least.
    – Grace Note StaffMod
    Commented Mar 8, 2011 at 21:53
  • @Grace, the very feature request for the automatic links (last edited May 2010) still has a bare link in it, which nowadays (and when you click the "edit" link") would be replaced. That somehow tells me the links are still replaced when saving a post? And what does "to no longer render HTML as HTML" mean?
    – Arjan
    Commented Mar 8, 2011 at 22:10
  • Ah, good point there. As for the later point, it used to render things like <i> or <sub> (without backticks, of course) in titles as if they were legal HTML. See here.
    – Grace Note StaffMod
    Commented Mar 8, 2011 at 22:13
  • I actually use shortlinks because of their, well, shortness, but then again I usually forget to remove the referral part... But since the link title is not determined by the actual question but only by the title given in the long link, this request will probably be declined or bydesign Commented Mar 9, 2011 at 7:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .