[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 359
  • Last Modified:

URL Max Character lengths?

Hello, I need to create a URl which will contain a lot of querystrings therefore making a very long URL.

I've been reading various online resourceser/sites about character string lengths. My question is: what is the actual maximum character length that can be used nowards?
It seems to be browser specific. Where I find a complete list of briwser character length restrictions?

Thanks in advance!
0
speedygonzalez
Asked:
speedygonzalez
  • 2
1 Solution
 
Frosty555Commented:
The maximum length of a URL depends both on the browser (the HTTP Client), and also on the web server (the HTTP Server).

Some interesting info on it is here:
http://www.boutell.com/newfaq/misc/urllength.html

I'd limit yourself to about 2000 characters to be safe with all modern browsers.
0
 
speedygonzalezAuthor Commented:
Thanks Frosty. That's very helpful. Is that current also (I note the article was written in 2006)?

I read somewhere that HTML 4 will allow longer valus. Are we usig HTML 4 now or 5? I'm not too familiar on it to be honest.
0
 
Frosty555Commented:
Hi speedygonzalez,

It is pretty likely that most modern browsers no longer have the limitations on the URL length imposed on them. The problem is more frequently you will find that web servers (such as IIS) can be several years old and have never been upgraded / patched depending on the server they are running on, which is something you can't really control.

Nevertheless the general practice of not allowing your url lengths to exceed about 2000 characters is still a good idea. If you are passing that much data you should probably be rethinking things and using cookies / sessions / POST instead.

It's not the HTML specification that puts limits on URL lengths, it's the HTTP specification (HTML is just the markup language for describing web pages, it doesn't have anything to do with the communication between server and client). The HTTP specification does not impose any actual limits on the URL lengths, technically it can be of unlimited length. The problem is purely an issue with specific browsers and webservers that have limitations due to their poor design - basically somebody at Microsoft cut corners somewhere, and now we all have to bend over backwards to support it ;)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now