Search code examples
c#javaasp.netnaming-conventionsrequest.querystring

How do you name your query string variables? Short or long? Why?


In our code we have query string variables with very short names such as cId, iId, isA and u. It is very hard to tell what this variables are from their names. I want to use more descriptive names such as customerId, itemId, isAnonymous and user.

I want to know the disadvantages of using long names in query strings if there are any.

Thanks


Solution

  • I would keep variable names short, as the limit tends to be about 2,047 characters, but other browsers can handle more. There's a good explanation here: http://www.asp101.com/tips/index.asp?id=102

    Just because Nija sees 4,000 in one of his, is definitely not a good idea to assume that will work for you.