Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Is there a restriction on the size of a URL/Query string?

Posted on 2001-08-02
6
Medium Priority
?
234 Views
Last Modified: 2013-12-25
Hi,

I have come across web servers that truncate the query parameters present in the url (e.g. http://mypage.com/myPage.jsp?arg1=23&arg2=45) if the whole string exceeds a size limit?

Is there any such limit in HTTP protocol, if yes what is the limit and where is it defined?  Has anybody experienced such stuff?  Is it a browser problem, if yes, do IE and NN both do that?

I would really appreciate a quick response.

Thanks,

KM
0
Comment
Question by:kmahmood
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 18

Expert Comment

by:mgfranz
ID: 6350500
It depends on how the data is passed to the page, if the <form> field uses POST, then the limit is 254 characters.  GET allows something like 64k.

I do not recommend passing anything more that 254 characters in the URL string, more than that can cause a bind on the server.  If you have to, use Sessions, Cookies, or hidden field parameters instead.

IE is a little more forgiving than NN, (not sure about NN6 though).
0
 
LVL 1

Accepted Solution

by:
gordonmcmullan earned 80 total points
ID: 6400215
Hi,

I think you have this the wrong way round.

GET requests should be kept below 255 characters.

A GET request is encoded into the URL submitted to a server whilst a POST request is contained in the data section of the request.

There are some browsers, proxies, caches, etc out there that truncate URL's over 255 characters, thus affecting the GET request. If you are expecting to exceed 255 characters in your data then use POST when submitting your request. (note: URL encoding for characters not allowed in URLs may increase the size of the URL you need)

This does have a downside as the request is no longer bookmarkable.

255 characters gives a fairly long string is this the limit you are seeing?

Gordon McMullan
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6400458
DOH, your right... Thanks Gordon.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 5

Expert Comment

by:raizon
ID: 6450793
The HTTP protocol itself doesn't restrict the limit the size of the query string.  Its the browsers that do.  IE limits it to essentially 3k, where with Netscape I havn't been able to find any information on what the limit is.
0
 
LVL 18

Expert Comment

by:bruno
ID: 6840817
Hello,

This question has been open for quite a while now and needs to be wrapped up.

Please do NOT accept this comment as an answer, as I am simply trying to alert those involved that the
question is still open.

If any of the experts could come back and post any suggestions as to how they feel this could be wrapped
up (delete, 0 PAQ, award points, etc), I'm sure the moderators would appreciate it.

Thank you,

BRUNO
0
 
LVL 5

Expert Comment

by:raizon
ID: 6841578
I vote for a delete.  There really isn't any information worth  a 0 PAQ.  Either that or split the points between gordon and mgfranz
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

597 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