8

I don't know if this has happened to you, but I find it excruciatingly annoying when, in a relatively short comment, a link I've included takes up a hundred or even two hundred characters, thereby rendering my comment too long and forcing me to chop it up and continue in another box.

Here's an example. Suppose I look up on Google Books the phrase "you met's" because I want to find and share examples of a [noun + relative clause] being used as a Determiner, as in:

  • That woman you met's husband

This would give me the URL:

... which could take up a huge chink of the character allowance.

Is there any way around this annoying problem?

2
  • Could you give an example? There are definitely short forms of StackExchange links available (particularly for links on the same site).
    – Andrew Leach Mod
    Mar 2 at 15:47
  • @AndrewLeach Done, Mar 2 at 15:53

2 Answers 2

12

For the Google link in the question, simply strip off everything not relevant.

q="you met's" is relevant and needs to stay, but the & after that and everything else is irrelevant. You can even use just the domain name: for these links, www. isn't needed. Note that some characters are expanded to their encoded form when displayed, but I typed https://google.com/search?q="you met's" for the URL, and that's what was displayed in the answer preview.

https://google.com/search?q=%22you%20met%27s%22

If you want to get results in books, include the &tbm=bks part. https://www.google.com/search?q="you met's"&tbm=bks. There will be a similar specification for other result sets.

https://www.google.com/search?q=%22you+met%27s%22&tbm=bks

For links to ELU questions, you can omit almost everything except the post number for a post on the same site: this question is number 15230 on Meta.ELU, so you can enter a link with just a relative URL: link which is coded as [link](/q/15230) and is a lot shorter than https://english.meta.stackexchange.com/questions/15230/how-to-stop-links-in-comments-taking-up-the-entire-character-allowance

Links can always be examined in the source code of a post if you're unsure of their destination, although browsers do a good job of interpreting them these days and displaying some sort of status text. The days of using JavaScript to alter the status bar when hovering over a link are over; and Stack Exchange doesn't allow scripting anyway.

It's this facility which explains why link shorteners are frowned upon — a link to a tinyurl URL shows no information about where that link will actually end up. Here's one which I will say will go to OED. It doesn't, but it's safe to click on: link to OED https://tinyurl.com/yae6wd2m [Check the edit history if you want to see whether the link is still what I originally started out with: it could have been altered and there's no way of knowing the destination.]

Link shorteners are improved when there's a preview possible: this is the same link but to a preview page https://preview.tinyurl.com/yae6wd2m which shows you exactly where it's going. With tinyurl it's possible for users to set a cookie so that they always get the preview, but that's an end-user setting. When you're constructing a link, using the preview version of the URL forces that behaviour.

6
  • 1
    Great! Thanks. However, the first link you gave doesn't take me to examples in published books. How would I solve that? Mar 2 at 16:25
  • You need to put in what is necessary. That appears to be set with the &tbm=bks part. https://www.google.com/search?q="you met's"&tbm=bks google.com/search?q=%22you+met%27s%22&tbm=bks
    – Andrew Leach Mod
    Mar 2 at 16:28
  • To get the 'preview' version can you always simply add 'preview.' between the slashes and 'tinyurl'? Mar 2 at 16:30
  • It appears to be. The old version of their bookmarklet created a preview link as well as the "direct" link, but that seems to have changed. However, the preview link I created here works, so I guess that's the way to do it. I would still counsel that link shorteners are the last resort though: shorten links with the right domain name wherever that's possible (and since tinyurl needs preview to be added, some editing is needed anyway). And adding links to comments suggests that you are answering in comments, which is definitely frowned upon.
    – Andrew Leach Mod
    Mar 2 at 16:48
  • I won't comment on answering in comments in general. However, I can confidently say that the links I've used have not been part of such frowned-upon activities. Mar 2 at 16:51
  • @AndrewLeach Thank you for these suggestions, they're very helpful. However, I think that it is still tough to shorten some URLs. For example, in Google Books ngrams, the URL might include "year_start=1800", "year_end=2019", "corpus=26", "case_insensitive=true", etc. I assume that if you didn't want default values, then you couldn't eliminate those, so the URL could still be very long. Mar 16 at 18:32
2

Funny you should ask. I've recently stumbled across a really useful solution to this problem. More specifically, I was shown how to do it to reduce a four-line URL that I had to include in a document. Most of you are probably intimately familiar with it, so this is for those of you who might find it useful who aren't.

This does involve a particular website, but it's so useful and the website so well-known that I doubt this will be taken as an advertisement here.

The solution is to go to:

Stick your diplodocus-length URL in the box there and let it generate a nice squat wombat-length one for you. Then use that for your link in your comment box.

For the long URL link in your question, this would give you a wieldy replacement of something like

Bingo.

4
  • 1
    Link shorteners are frowned upon. They could link to anything.
    – Andrew Leach Mod
    Mar 2 at 15:59
  • @AndrewLeach Fair enough, but I don't understand that at all. Once it's been formatted as a link, any link could link to anything! Mar 2 at 16:07
  • @AndrewLeachAnd just to support the point, I've used lots of them over the past few weeks and no-one's ever looked inside the comment at the link, otherwise, presumably they'd have pulled me up on it! How often do you check the URL's inside a link? Mar 2 at 16:11
  • 4
    Always; well, I can generally rely on the browser to do it for me.
    – Andrew Leach Mod
    Mar 2 at 16:22

You must log in to answer this question.

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