snipt

Ctrl+h for KB shortcuts
Notice: Snipt is moving away from free accounts on May 1st, 2014. Read more about the transition here.
#54719

HTML

The new favicon

1
2
3
4
5
6
7
<!-- From http://www.jonathantneal.com/blog/understand-the-favicon/ -->
<link rel="apple-touch-icon" href="path/to/touchicon.png">
<link rel="icon" href="path/to/favicon.png">
<!--[if IE]><link rel="shortcut icon" href="path/to/favicon.ico"><![endif]-->
<!-- or, set /favicon.ico for IE10 win -->
<meta name="msapplication-TileColor" content="#D83434">
<meta name="msapplication-TileImage" content="path/to/tileicon.png">
https://snipt.net/embed/8d8e71d05098a01840da01999d8a86ff/
https://snipt.net/raw/8d8e71d05098a01840da01999d8a86ff/
8d8e71d05098a01840da01999d8a86ff
html
HTML
7
2014-04-16T20:57:07
True
False
Jan 29, 2013 at 10:46 AM
/api/public/snipt/54719/
the-new-favicon
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">&lt;!-- From http://www.jonathantneal.com/blog/understand-the-favicon/ --&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">&quot;apple-touch-icon&quot;</span> <span class="na">href=</span><span class="s">&quot;path/to/touchicon.png&quot;</span><span class="nt">&gt;</span> </span><span id="L-3"><a name="L-3"></a><span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">&quot;icon&quot;</span> <span class="na">href=</span><span class="s">&quot;path/to/favicon.png&quot;</span><span class="nt">&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="c">&lt;!--[if IE]&gt;&lt;link rel=&quot;shortcut icon&quot; href=&quot;path/to/favicon.ico&quot;&gt;&lt;![endif]--&gt;</span> </span><span id="L-5"><a name="L-5"></a><span class="c">&lt;!-- or, set /favicon.ico for IE10 win --&gt;</span> </span><span id="L-6"><a name="L-6"></a><span class="nt">&lt;meta</span> <span class="na">name=</span><span class="s">&quot;msapplication-TileColor&quot;</span> <span class="na">content=</span><span class="s">&quot;#D83434&quot;</span><span class="nt">&gt;</span> </span><span id="L-7"><a name="L-7"></a><span class="nt">&lt;meta</span> <span class="na">name=</span><span class="s">&quot;msapplication-TileImage&quot;</span> <span class="na">content=</span><span class="s">&quot;path/to/tileicon.png&quot;</span><span class="nt">&gt;</span> </span></pre></div> </td></tr></table>
favicon
#41948

HTML+PHP

Add favicon to WordPress

<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.ico" />
https://snipt.net/embed/62045bbbac6326b4645527ed540d76a6/
https://snipt.net/raw/62045bbbac6326b4645527ed540d76a6/
62045bbbac6326b4645527ed540d76a6
html+php
HTML+PHP
1
2014-04-16T11:46:51
True
False
/api/public/snipt/41948/
add-favicon-to-wordpress
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">&quot;shortcut icon&quot;</span> <span class="na">href=</span><span class="s">&quot;</span><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">get_template_directory_uri</span><span class="p">();</span> <span class="cp">?&gt;</span><span class="s">/favicon.ico&quot;</span> <span class="nt">/&gt;</span> </span></pre></div> </td></tr></table>
favicon, wordpress
#16170

HTML

favicon

<!-- Favicon -->
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
https://snipt.net/embed/de8137eb669e44121f2e5def5dffc73c/
https://snipt.net/raw/de8137eb669e44121f2e5def5dffc73c/
de8137eb669e44121f2e5def5dffc73c
html
HTML
2
2014-04-21T16:36:47
True
False
/api/public/snipt/16170/
favicon-7
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">&lt;!-- Favicon --&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">&quot;shortcut icon&quot;</span> <span class="na">href=</span><span class="s">&quot;/favicon.ico&quot;</span> <span class="na">type=</span><span class="s">&quot;image/x-icon&quot;</span> <span class="nt">/&gt;</span> </span></pre></div> </td></tr></table>
favicon
#15939

HTML

Iphone icon

1
2
3
4
5
6
7
<!--
PNG
57px * 57px
No rounded corners
-->

<link rel="apple-touch-icon" href="/customIcon.png"/>
https://snipt.net/embed/0a31676fb220b4c8c8fbe658d1f4a16a/
https://snipt.net/raw/0a31676fb220b4c8c8fbe658d1f4a16a/
0a31676fb220b4c8c8fbe658d1f4a16a
html
HTML
7
2014-04-16T15:19:47
True
False
/api/public/snipt/15939/
iphone-icon
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">&lt;!--</span> </span><span id="L-2"><a name="L-2"></a><span class="c">PNG</span> </span><span id="L-3"><a name="L-3"></a><span class="c">57px * 57px</span> </span><span id="L-4"><a name="L-4"></a><span class="c">No rounded corners</span> </span><span id="L-5"><a name="L-5"></a><span class="c">--&gt;</span> </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">&quot;apple-touch-icon&quot;</span> <span class="na">href=</span><span class="s">&quot;/customIcon.png&quot;</span><span class="nt">/&gt;</span> </span></pre></div> </td></tr></table>
favicon, html
#14738

ApacheConf

servindo favicon pelo apache. Config do htaccess

RewriteRule ^favicon\.ico$ /media/images/favicon.ico [L]
https://snipt.net/embed/0fa84d2f4d395b7456db449a7ec3c389/
https://snipt.net/raw/0fa84d2f4d395b7456db449a7ec3c389/
0fa84d2f4d395b7456db449a7ec3c389
apacheconf
ApacheConf
1
2014-04-08T03:57:19
True
False
/api/public/snipt/14738/
servindo-favicon-pelo-apache-config-do-htaccess
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nb">RewriteRule</span> ^favicon\.ico$ <span class="sx">/media/images/favicon.ico</span> [L] </span></pre></div> </td></tr></table>
apache, favicon
#2762

HTML

Include Favicon

<link rel="shortcut icon" href="favicon.ico" />
https://snipt.net/embed/c66d4cfb371f0bda721baed025e21364/
https://snipt.net/raw/c66d4cfb371f0bda721baed025e21364/
c66d4cfb371f0bda721baed025e21364
html
HTML
1
2014-04-21T22:58:51
True
False
/api/public/snipt/2762/
include-favicon
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">&quot;shortcut icon&quot;</span> <span class="na">href=</span><span class="s">&quot;favicon.ico&quot;</span> <span class="nt">/&gt;</span> </span></pre></div> </td></tr></table>
favicon, html
#1952

HTML

Favicon

1
2
3
4
<link rel="icon" type="image/png" href="myicon.png" />
	<!--[if IE]>
	<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="myicon.ico" />
	<![endif]-->
https://snipt.net/embed/7751d48df8affa0ec7c8c4f7f50b54cf/
https://snipt.net/raw/7751d48df8affa0ec7c8c4f7f50b54cf/
7751d48df8affa0ec7c8c4f7f50b54cf
html
HTML
5
2014-03-30T05:51:52
True
False
/api/public/snipt/1952/
favicon-2
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">&quot;icon&quot;</span> <span class="na">type=</span><span class="s">&quot;image/png&quot;</span> <span class="na">href=</span><span class="s">&quot;myicon.png&quot;</span> <span class="nt">/&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="c">&lt;!--[if IE]&gt;</span> </span><span id="L-3"><a name="L-3"></a><span class="c"> &lt;link rel=&quot;shortcut icon&quot; type=&quot;image/vnd.microsoft.icon&quot; href=&quot;myicon.ico&quot; /&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="c"> &lt;![endif]--&gt;</span> </span></pre></div> </td></tr></table>
favicon, html
#1442

HTML

Favicon

1
2
3
4
5
6
7
<head profile="http://www.w3.org/2005/10/profile">
	<!-- Some code here -->
	<link rel="icon" type="image/png" href="myicon.png" />
	<!--[if IE]>
	<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="myicon.ico" />
	<![endif]-->
</head>
https://snipt.net/embed/204a401986f227226d72b7c12303b601/
https://snipt.net/raw/204a401986f227226d72b7c12303b601/
204a401986f227226d72b7c12303b601
html
HTML
7
2014-04-03T07:41:24
True
False
/api/public/snipt/1442/
favicon-1
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nt">&lt;head</span> <span class="na">profile=</span><span class="s">&quot;http://www.w3.org/2005/10/profile&quot;</span><span class="nt">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="c">&lt;!-- Some code here --&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">&quot;icon&quot;</span> <span class="na">type=</span><span class="s">&quot;image/png&quot;</span> <span class="na">href=</span><span class="s">&quot;myicon.png&quot;</span> <span class="nt">/&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="c">&lt;!--[if IE]&gt;</span> </span><span id="L-5"><a name="L-5"></a><span class="c"> &lt;link rel=&quot;shortcut icon&quot; type=&quot;image/vnd.microsoft.icon&quot; href=&quot;myicon.ico&quot; /&gt;</span> </span><span id="L-6"><a name="L-6"></a><span class="c"> &lt;![endif]--&gt;</span> </span><span id="L-7"><a name="L-7"></a><span class="nt">&lt;/head&gt;</span> </span></pre></div> </td></tr></table>
favicon, html