Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there any way to overcome the 2k character limitation on the URL length?

Tags:

url

I think the URL length can only be 2000 or so characters long. Otherwise, it will choke some versions of IE. Is there any way to overcome this problem?

At first i was thinking about tinyurl, but tinyurl actually immediately redirects to the longer URL, so that probably will fail too.

Update:

I need such long URL because I need to be able for people to bookmark the URL or to send it to other people by email.

like image 579
nonopolarity Avatar asked Dec 06 '22 06:12

nonopolarity


2 Answers

That's what POST is for ;)

like image 96
PQW Avatar answered Dec 07 '22 19:12

PQW


For bookmarking reasons you could store a hash of the argument string in the databse as well as the argument list. That way when somone bookmarks something they get a bookmark with the hash in it and your internal software looks up the appropriate arguments and gets them.

You are in essence rolling your own tiny url.

If somone else wants to bookmark a page with the same arguments then the hash will be the same.

the only problem is that your table of hashes will grow quite big, and many of these "book marks" might never be used.

like image 33
Omar Kooheji Avatar answered Dec 07 '22 19:12

Omar Kooheji