Isn't it silly that a tiny favicon requires yet another HTTP request? How can I put the favicon into a sprite?

后端 未结 14 1792
暖寄归人
暖寄归人 2020-11-29 14:58

Everybody knows how to set up a favicon.ico link in HTML:



        
14条回答
  •  一整个雨季
    2020-11-29 15:10

    The proper solution is to use HTTP pipelining.

    HTTP pipelining is a technique in which multiple HTTP requests are written out to a single socket without waiting for the corresponding responses. Pipelining is only supported in HTTP/1.1, not in 1.0.

    It's required that servers support it, but not necessarily partipate.

    HTTP pipelining requires both the client and the server to support it. HTTP/1.1 conforming servers are required to support pipelining. This does not mean that servers are required to pipeline responses, but that they are required not to fail if a client chooses to pipeline requests.

    Many browser clients don't do it, when they should.

    HTTP pipelining is disabled in most browsers.

    • Opera has pipelining enabled by default. It uses heuristics to control the level of pipelining employed depending on the connected server.
    • Internet Explorer 8 does not pipeline requests, due to concerns regarding buggy proxies and head-of-line blocking.
    • Mozilla browsers (such as Mozilla Firefox, SeaMonkey and Camino), support pipelining however it is disabled by default. It uses some heuristics, especially to turn pipelining off for IIS servers.
    • Konqueror 2.0 supports pipelining, but it's disabled by default.[citation needed]
    • Google Chrome does not support pipelining.

    I would recommend you try enabling pipelining in Firefox and try it there, or just use Opera (shudder).

提交回复
热议问题