Skip to content

Instantly share code, notes, and snippets.

@VasilSlavchev
Forked from ozh/get_favicon.md
Created October 16, 2019 12:48
Show Gist options
  • Select an option

  • Save VasilSlavchev/fc5333e54315dcb08b7fbcdeee2ca65d to your computer and use it in GitHub Desktop.

Select an option

Save VasilSlavchev/fc5333e54315dcb08b7fbcdeee2ca65d to your computer and use it in GitHub Desktop.

Revisions

  1. @ozh ozh revised this gist May 4, 2014. 1 changed file with 11 additions and 11 deletions.
    22 changes: 11 additions & 11 deletions get_favicon.md
    Original file line number Diff line number Diff line change
    @@ -1,21 +1,21 @@
    Most standard ways to get a favicon from a page, in preferred order

    ## In file:
    `<link href="http://someserver/favicon.ico" rel="shortcut icon" />`
    `<link href="http://someserver/favicon.ico" rel="shortcut" />`
    `<link href="http://someserver/favicon.ico" rel="icon" />`
    `<link href="http://someserver/favicon.png" rel="apple-touch-icon" />`
    `<link href="http://someserver/favicon.png" rel="apple-touch-icon-precomposed" />`
    `<link href="http://someserver/favicon.ico" rel="image_src" />`
    * `<link href="http://someserver/favicon.ico" rel="shortcut icon" />`
    * `<link href="http://someserver/favicon.ico" rel="shortcut" />`
    * `<link href="http://someserver/favicon.ico" rel="icon" />`
    * `<link href="http://someserver/favicon.png" rel="apple-touch-icon" />`
    * `<link href="http://someserver/favicon.png" rel="apple-touch-icon-precomposed" />`
    * `<link href="http://someserver/favicon.ico" rel="image_src" />`

    Don't forget to match arbitrary orders of attributes, eg
    `<link rel="apple-touch-icon" sizes="72x72" href="apple.png" />`
    * `<link rel="apple-touch-icon" sizes="72x72" href="apple.png" />`


    ## File at root:
    Current dir: `http://someserver/directory/favicon.ico`
    Root dir: `http://someserver/favicon.ico`
    * Current dir: `http://someserver/directory/favicon.ico`
    * Root dir: `http://someserver/favicon.ico`

    ## Social stuff:
    `<meta content="http://someserver/favicon.ico" itemprop="image" />`
    `<meta content="http://someserver/favicon.ico" property="og:image" />`
    * `<meta content="http://someserver/favicon.ico" itemprop="image" />`
    * `<meta content="http://someserver/favicon.ico" property="og:image" />`
  2. @ozh ozh created this gist May 4, 2014.
    21 changes: 21 additions & 0 deletions get_favicon.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    Most standard ways to get a favicon from a page, in preferred order

    ## In file:
    `<link href="http://someserver/favicon.ico" rel="shortcut icon" />`
    `<link href="http://someserver/favicon.ico" rel="shortcut" />`
    `<link href="http://someserver/favicon.ico" rel="icon" />`
    `<link href="http://someserver/favicon.png" rel="apple-touch-icon" />`
    `<link href="http://someserver/favicon.png" rel="apple-touch-icon-precomposed" />`
    `<link href="http://someserver/favicon.ico" rel="image_src" />`

    Don't forget to match arbitrary orders of attributes, eg
    `<link rel="apple-touch-icon" sizes="72x72" href="apple.png" />`


    ## File at root:
    Current dir: `http://someserver/directory/favicon.ico`
    Root dir: `http://someserver/favicon.ico`

    ## Social stuff:
    `<meta content="http://someserver/favicon.ico" itemprop="image" />`
    `<meta content="http://someserver/favicon.ico" property="og:image" />`