ASP 101 - Active Server Pages 101 - Web04
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates

ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

 Top ASP 101 Stories Top ASP 101 Stories
Getting Scripts to Run on a Schedule
The Top 10 ASP Links @
What is and Why Do I Need It?

Autofix IIS Failures
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates

Quick Tips

The QueryString Has a Maximum Length

Sure using the QueryString is an easy way to pass information from one ASP page to another, but there is a limit to the amount of information you can squeeze into the address bar.

For a lot of uses the QueryString is a better choice for data transfer then the Form collection. It allows for bookmarking of result pages, simple debugging, and you don't have to use a form to utilize it, but there is one place it falls short: the amount of data you can transfer.

The amount of data you can transfer on the QueryString is limited by a number of factors, but the one that seems to be the most restrictive is the space in your browser's address bar. The Internet Explorer versions 5 and 6 that I tested only allowed up to 2,047 characters while Netscape Navigator version 4 seemed to be able to handle up to 30,000 and I couldn't get version 6 much past 9,000.

Before you start thinking that 2,047 is a lot, it's not like you can go ahead and use all of those characters. That limit is even less once you deduct the address of your site, the path to the requested file, and even the requested file name.

Even with those deductions, you're still left some space to play with, but realize that it's not endless. For those occasions when you can't determine how much data you'll be moving around ahead of time or when you're using a textarea element, it might make sense to use a post to the Form collection just to be on the safe side.

More Info:
INFO: Maximum URL Length Is 2,083 Characters in Internet Explorer
HOW TO: Use QueryString to Persist User Information Among ASP Pages

Previous      Show All Tips      Next

If you have a tip you would like to submit, please send it to:

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers