<分区>
Possible Duplicate:
What is the maximum length of a URL?
您好,我想将referer记录到我的数据库中,我想知道referer的最大长度是多少?
标签 http
<分区>
Possible Duplicate:
What is the maximum length of a URL?
您好,我想将referer记录到我的数据库中,我想知道referer的最大长度是多少?
最佳答案
referer
是一个URL,可以引用this answer about maximum URL lengths . URL 的长度几乎肯定不会超过 2083 个字符,因为这是 maximum supported by some versions of IE , 它看起来像 Google doesn't index anything over 1855 characters .
因此,如果您存储为 CHAR
,那么使用 2083 是安全的,如果您存储为 VARCHAR
,那么这真的无关紧要因为任何超过 255 个字符的字符串都需要 2 个字节来存储它的长度,所以选择像 3000 这样高的字节。
关于http - referer 的最大长度是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11798451/