• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Length of a URL

 
Suku Kana
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I am not sure whether this question fits in here. But, I am also not sure where else to post it.
I have a servlet to which I am passing lots of parameters. I found that in IE, if I pass more than 2050 characters as a URL, the request doesn't even reach the servlet. In netscape, I found that the number of characters allowed in a URL is more (not sure how long).
Can anyone tell me whether there is any restriction on the number of characters allowed in a URL? If so, how many in IE/Netscape?
Regards,
Suresh.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same question once and someone pointed out RFC2616 - HTTP 1.1, section 3.2.1 in particular, which states:
Note: Servers ought to be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations might not properly support these lengths.

Now this RFC is dated June 1999 so I'd hope things were better than this, but there is no guarantee. I tend to try to limit things to 1024 characters, but there are too many things that can go wrong if you leave it unbounded...
Dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic