V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
zeyexe
V2EX  ›  问与答

浏览器的Accept-Language的q代表什么?

  •  
  •   zeyexe · 2013-08-04 17:22:32 +08:00 · 5759 次点击
    这是一个创建于 3915 天前的主题,其中的信息可能已经有所发展或是发生改变。
    像这样 'Accept-Language': 'zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3',这个q代表什么?权重吗?
    1 条回复    1970-01-01 08:00:00 +08:00
    xuc
        1
    xuc  
       2013-08-04 17:27:15 +08:00   ❤️ 1
    Google就知道了啊

    HTTP/1.1 Specification, §14.4:

    Each language-range MAY be given an associated quality value which represents an estimate of the user's preference for the languages specified by that range. The quality value defaults to "q=1". For example,
    Accept-Language: da, en-gb;q=0.8, en;q=0.7
    would mean: "I prefer Danish, but will accept British English and other types of English."
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   979 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 21:51 · PVG 05:51 · LAX 14:51 · JFK 17:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.