Skip to content
This repository

User Agent DB VARCHAR(120) too short for iPad UA #1090

Closed
jdpedrie opened this Issue February 28, 2012 · 4 comments

5 participants

John Dennis Pedrie Phil Sturgeon CroNiX Timothy Warren Andrey Andreev
John Dennis Pedrie

Hi,

I found the ticket #463 that made mention that the ci_sessions field for User Agent was increased to 120 characters. This is still too short.

The User Agent on an iPad 2 is similar to the following:

Mozilla/5.0(iPad; U; CPU OS 4_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8F191 Safari/6533.18.5

It's 138 characters long. I changed my ci_sessions table to VARCHAR(255) and everything is fixed.

Thanks

CroNiX

It's too short for a LOT of IE user agents strings as well and they can easily go over 250 chars depending on how many versions of .NET are installed. Each .NET update appends additional info to the user string instead of replacing the previous.

Timothy Warren

If you go to VARCHAR(255), you might as well go all the way to TEXT.

I think a better solution would be to truncate Useragents to 120 characters. Past that, there usually isn't much useful information anyway.

Andrey Andreev
Collaborator

The user agent string IS truncated to 120 characters when used in the Session library.

Phil Sturgeon

You don't need to store the whole thing, user agents are getting silly and we could probably store them in TEXT but it's enough for basic matching.

Phil Sturgeon philsturgeon closed this March 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.