popok
V2EX  ›  问与答

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

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


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

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

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