shortly icon indicating copy to clipboard operation
shortly copied to clipboard

Deal with URL length limits

Open lucaspiller opened this issue 12 years ago • 7 comments

lucaspiller avatar Apr 12 '12 23:04 lucaspiller

How about gzipping the text, base64 encoding that and then on the other side doing precisely the opposite?

mrshu avatar May 13 '13 11:05 mrshu

That's exactly what happens at the moment, but we use raw deflate rather than the gzip file format.

lucaspiller avatar May 13 '13 11:05 lucaspiller

Outside Internet Explorer the limit for URL length is always above 100k (tested for a project 2 years ago and re-tested recently)

naugtur avatar May 13 '13 13:05 naugtur

how hard would it be to just incorporate a url shortener? There's a free shortener called tny.im. You can simply prefix the url you want to shorten with tny.im/ & hitting enter. Going to http://tny.im/https://github.com/lucaspiller/shortly/issues/2 would create a short url for this url. You could easily create a bookmarklet to do it too.

nathgit avatar May 23 '20 14:05 nathgit

Wouldn't that literally defeat the purpose?

naugtur avatar May 23 '20 15:05 naugtur

I meant as an option as I way to share a long snippet of text. There are plenty of url shorteners, but not many that let you just share a long snippet of text. This is perfect for saving snippets, but the length of the url does make it more difficult to share.

nathgit avatar May 24 '20 00:05 nathgit

You can easily shorten a url with tny.im by saving javascript:void(window.open('https://tny.im/index.php?format=simple&action=shorturl&url='+escape(location.href))) as a bookmarklet.

nathgit avatar May 24 '20 00:05 nathgit