• Post Reply Bookmark Topic Watch Topic
  • New Topic

How long can User-Agent String be?

 
Mike London
Ranch Hand
Posts: 1290
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to ensure that I'll have enough room in my database field to store the browser's User-Agent field, as in, request.getHeader("User-Agent");

I'm having a bit of trouble finding the maximum length of this string. For Firefox, the length is 90 characters, but I'm not sure if other browsers could have longer strings.

I've looked on the net and in the books I have, but don't see this max length for this header.

Thanks in advance.

-- Mike
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know of no maximum length.

Perhaps the HTTP specification has some info on this?
[ June 14, 2006: Message edited by: Bear Bibeault ]
 
Mike London
Ranch Hand
Posts: 1290
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
Filippo Vitale
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest to have a look also to that list:
http://www.pgts.com.au/download/data/browser_list.txt

Loooot of different browser out there!

Hope it helps,
Filippo
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!