1 - Build a database of short to unshortened URLs as a backup in case that one of the shortening services goes under.
2 - Such a service can be useful for anyone who wants to know where the URL points to without clicking it (or without the skills to unshorten it themselves).
3 - It could allow for batch unshortening
4 - A database can still unshorten URLs that no longer exist
etc..
Java sadly doesn't have a decent non blocking dns resolution system :( On a restart, Mibbit needs to do a few thousand DNS lookups... and quick. I can only stand a thread pool so long.
I'd like to know where a link leads to before clicking on it; may be a small tooltip, like someone else in this thread suggested. This would avoid things like "Oh I didn't really expect a video here" to "Oops, my coworker would have thought I opened that NSFW website intentionally".
Sure, this is not a complete solution (there are videos in sites other than Youtube, Metacafe, etc., and NSFW content in just too many websites), but would help in very many cases.
Actually I'm surprised not so many people are concerned about the security implications of having opaque URLs (there's been a lot of talk about this recently, but very little action AFAIK).
I've been thinking about this lately and thought a Firefox extension might be of help. I was just planning to shake off my laziness and learn about how to make an extension so I could make this one.
It could do caching. That would be nice in case a shortener went down.
If it did caching, it would also act as a proxy. That would be nice if I decided to build a greasemonkey script/firefox add-on to automatically unshorten things; I wouldn't necessarily ping the counters attached to every shortened URL that loads with a page.
Comments
I'm at a loss to understand why someone needs an API to unshorten a url. Can they not just unshorten it themselves?
What's next? A webservice API for doing DNS lookups?
I can see several reasons for this:
1 - Build a database of short to unshortened URLs as a backup in case that one of the shortening services goes under.
2 - Such a service can be useful for anyone who wants to know where the URL points to without clicking it (or without the skills to unshorten it themselves).
3 - It could allow for batch unshortening
4 - A database can still unshorten URLs that no longer exist etc..
> for [anyone] without the skills to unshorten it themselves
I think I'm one, because I don't know of any way to unshorten these tiny URLs without visiting them or using some such service.
If you know of one, could you enlighten me? Thanks...
It's really not hard. For example, on the command line:
or in Python: etc...Says the guy who wrote his own DNS client.... ;)
touche! Not for external use though...
Java sadly doesn't have a decent non blocking dns resolution system :( On a restart, Mibbit needs to do a few thousand DNS lookups... and quick. I can only stand a thread pool so long.
> ...Java...
Well there's your problem! :P
sigh
Yeah. Handling 1000+ http requests a second on a single 1.4GB VPS is lame isn't it.
Java rocks. But it's not for beginners.
I'd like to know where a link leads to before clicking on it; may be a small tooltip, like someone else in this thread suggested. This would avoid things like "Oh I didn't really expect a video here" to "Oops, my coworker would have thought I opened that NSFW website intentionally".
Sure, this is not a complete solution (there are videos in sites other than Youtube, Metacafe, etc., and NSFW content in just too many websites), but would help in very many cases.
Actually I'm surprised not so many people are concerned about the security implications of having opaque URLs (there's been a lot of talk about this recently, but very little action AFAIK).
I've been thinking about this lately and thought a Firefox extension might be of help. I was just planning to shake off my laziness and learn about how to make an extension so I could make this one.
A positive response to http://news.ycombinator.com/item?id=577896 might make this unnecessary, but then it might not...
It could do caching. That would be nice in case a shortener went down.
If it did caching, it would also act as a proxy. That would be nice if I decided to build a greasemonkey script/firefox add-on to automatically unshorten things; I wouldn't necessarily ping the counters attached to every shortened URL that loads with a page.