popok
V2EX  ›  问与答

谁来告诉我, V2EX 的 favicon.ico 是什么情况?

  •  
  •   popok · Sep 19, 2015 · 3574 views
    This topic created in 4077 days ago, the information mentioned may be changed or developed.


    经常无缘无故收藏栏图标变绿色这个。

    有点强迫症,求解
    5 replies  •  2015-09-19 23:49:29 +08:00
    Biwood
    Biwood
    Sep 19, 2015
    1
    服务端根目录用的是这张图 https://www.v2ex.com/favicon.ico

    而页面头部设置的是这张图 https://www.v2ex.com/static/img/icon_rayps_64.png
    popok
    popok
    OP
    Sep 19, 2015
    2
    @Biwood 然而不是应该根据页面<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">的定义来显示的吗?为什么会显示 favicon.ico 呢?
    popok
    popok
    OP
    Sep 19, 2015
    3
    @Biwood 不好意思,复制错行了。
    <link rel="shortcut icon" href="/static/img/icon_rayps_64.png" type="image/png">
    Biwood
    Biwood
    Sep 19, 2015❤️2
    4
    @popok <link rel="shortcut icon" href="/static/img/icon_rayps_64.png" type="image/png"> 这个设置是 HTML 标准,所有只在 .html 资源显示这张图片,打开非 .html 资源的时候服务器会返回默认的根目录的 favicon.ico ,貌似很多服务器都是这么设置的,我测试用的 Apache 就是这样。
    popok
    popok
    OP
    Sep 19, 2015
    5
    @Biwood 原来如此,有道理,感谢解答
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2309 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 00:22 · PVG 08:22 · LAX 16:22 · JFK 19:22
    ♥ Do have faith in what you're doing.