Solved

URL Max Character lengths?

Posted on 2011-02-11
3
352 Views
Last Modified: 2013-12-24
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
Comment
Question by:speedygonzalez
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
Frosty555 earned 125 total points
ID: 34870391
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
 

Author Comment

by:speedygonzalez
ID: 34870490
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
 
LVL 31

Expert Comment

by:Frosty555
ID: 34890221
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Whether you believe the “gig economy,” as it has been dubbed, is the next big economic paradigm shift (https://www.theguardian.com/commentisfree/2015/jul/26/will-we-get-by-gig-economy) or an overstated trend (http://www.wsj.com/articles/proof-of-a-g…
This story has been written with permission from the scammed victim, a valued client of mine – identity protected by request.
The Bounty Board allows you to request an article or video on any technical topic, or fulfill a bounty request to earn points. Watch this video to learn how to use the Bounty Board to get the content you want, earn points, and browse submitted bount…
Where to go on the main page to find the job listings. How to apply to a job that you are interested in from the list that is featured on our Careers page.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now