Possible Duplicate:
What is the maximum length of a URL?
Hello, I want to log referer into my database , I want to know what the maximum length is for referer ?
The referer
is a URL, so you can refer to this answer about maximum URL lengths. URLs will almost certainly be no more than 2083 characters in length, as this is the maximum supported by some versions of IE, and it looks like Google doesn't index anything over 1855 characters.
So if you're storing as a CHAR
then go for 2083 to be safe, and if you're storing as a VARCHAR
then it really doesn't matter since any string over 255 characters takes 2 bytes to store its length so go for something high like 3000.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With