Favicon format GIF or ICO?

后端 未结 6 1182
情歌与酒
情歌与酒 2021-01-01 11:38

Why use a GIF favicon? Is that for iPhone and iPad can read it?


相关标签:
6条回答
  • 2021-01-01 12:08
    • More people have access to create gif or png files.
    • gif's can be animated

    also, beware that gif favicons do not work in all versions of IE.

    0 讨论(0)
  • 2021-01-01 12:10

    .ico files are the most widely supported. Wikipedia has a list of which browsers support which formats.

    According to that list FireFox and Opera are the only ones that support animated GIFs, and IE doesn't support GIF at all.

    0 讨论(0)
  • 2021-01-01 12:13

    GIF favicons are sometimes used so that they can be animated, but ICOs have wider browser support. If you are trying to make favicons specifically for iPhone/iPod Touch, you might want to take a look at this:

    http://iboughtamac.com/2008/01/23/making-an-iphoneipod-touch-webclips-favicon/

    0 讨论(0)
  • 2021-01-01 12:16

    A GIF can be animated although browser support for this is currently quite limited. ICO is currently the more widely supported format (including iPhone and iPad). A full list of browser compatibility can be found in this WIkipedia article.

    0 讨论(0)
  • 2021-01-01 12:20

    Browsers started supporting it. Also, ICO files are an old image file format for icons in Microsoft Windows. Since ICO is vendor specific, some choose to go with GIF.

    Not to mention that there is an abundance of .gif editors, and few ICO editors.

    After reviewing supported formats, your best bet is to go with PNG files if you are trying to get away from ICO.

    0 讨论(0)
  • 2021-01-01 12:31

    Whether to go for GIF, ICO, PNG, SVG or something else for your favicon depends on a number of factors.

    The major reasons to go for ICO are:

    • Format supported by the majority of browsers (i.e. Internet Explorer before 11 doesn't support anything else).
    • It's the only format of the relevant ones that stores multiple images in one, in different sizes, allowing for one file to contain the icon in various sizes such as 16x16, 24x24, 32x32, 48x48, 64x64, 72x72 and 128x128 to name the most popular icon sizes. Depending on the available space and the available sizes in the icon file, the browser may then choose a most appropriate size for a given situation without having to upscale or downscale it.

    Reasons for GIF:

    • Animated GIF is the only possibility to get an animated favicon (as most browsers do not yet support SVG for favicons, and even if they do, whether they support JavaScript or SMIL animations in the case of favicons may be questionable).

    If your icon exists in only one size and support in older versions of Internet Explorer is no concern, you might prefer PNG or GIF because of the smaller file size. However, ICO files, if stored properly, are not significantly larger than PNG files, because since Windows Vista, ICO files can store PNG. So, a corresponding ICO file would be 22 bytes bigger (6 bytes header plus 16 bytes entry).

    Side-note: In the HTML that you've specified, there might be a contradiction. If the file /favicon.gif is indeed a GIF image, then the MIME-type used in the link is wrong. In that case, it should not be image/x-icon but image/gif.

    The Wikipedia page contains more information on this: https://en.wikipedia.org/wiki/Favicon

    0 讨论(0)
提交回复
热议问题