Saturday, April 21, 2012

This is really Cool, Does your site have a favicon?

What's the heck is a a Favicon?

when I first heard about this. That's what I asked myself , what the heck is a favicon?

I mean I knew what it was. As far as those little icons on the tabs of your browsers of the logo of the company of the website you're on. I had no idea how to create my own or install one, but now I know, and so will you!

favicon is the little icon that browsers display next to a page's title on a browser tab, or in the address bar next to its URL. It also is used when you bookmark a page. Here are some examples:

Favicon2

Here's an example of the bookmarks menu:

Bookmarks menu

Does Your Site Have a Favicon?

As you can see, the favicon is pretty important. It's critical for site recognition in a browser full of tabs, it's a great opportunity to expand your site's branding, and your site will simply look incomplete without one.

Unfortunately, many designers and developers don't realize how easy it is to add a favicon. They don't specify any, or they leave the generic one their webhost provides. How's that for branding – you end up with the same favicon as thousands of other sites!

Default webhost icon

No icon at all

Favicons add that extra polish that visitors (and clients) appreciate.

The Technical Details

The Size

Images for favicons should be 16x16 pixels. You can either resize an existing photo, or create a tiny image specifically for use as a favicon. When resizing a larger photo to be this small, you'll often lose important details or end up with a fuzzy image. To avoid this, you'll likely want to do some touch-up work after downsizing the larger photo. Or, just start with a 16x16 canvas to avoid resizing issues altogether.

What To Show

Because you only have 256 pixels to work with, it can be a little challenging to know what to include in a favicon. Here are some common ideas:

  • Use your logo (or part of it)
  • If your logo doesn't display well at such a small size, use a stylized version of the first letter (or letters) of your site or business name
  • Use an icon that communicates what your site does or represents (for example, Google Analytics uses a tiny chart for their favicon)

The Image Format

As the name suggests, favicons must use the icon (.ico) file format. In the past, it was a hassle to convert into this format. However, thanks to easy, free services, this is no longer the case. All you need to do is create a 16x16 image. The .ico format supports transparency, so you're not limited to creating a square icon. If you want to take advantage of transparency, use the .gif or .png format when creating your image.

Once you have your 16x16 image, go use a free service like favicon.cc to convert your image. Use the Import Image option to upload your original image:

Import image

You'll get to see a preview of your new icon. You can then download the converted icon:

Completed icon

Save the file within your site (more on the location next).

Where It Goes

Originally, favicons had to be named exactly favicon.ico and placed at the root of your domain (e.g. http://www.yourdomain.com/favicon.ico). This meant that you could only have one favicon per domain, period. However, as favicons have become standardized, more flexibility has been added. There are now two approaches:

One Favicon For Entire Domain

If you only want one favicon for your entire domain, simply save the favicon.ico file to the root folder of your site. When uploaded, it must be accessible fromhttp://www.yourdomain.com/favicon.ico . As soon as you upload the file, your browser should start displaying the icon for all pages on your site. If not, clear your browser cache and reload the page.

Page-Specific Favicons

If you want more control (and to be a little more standards-compliant), you can specify favicons on a page-by-page basis. To use this approach, save the .ico file anywhere within your site, such as an images/ folder. Then add the following code to your page:

<link rel="shortcut icon" href="/images/specialicon.ico" type="image/x-icon" />

Update the highlighted path to reference your new icon file. Note that we use a site-relative path (starting with a slash) so that it will be a valid link regardless of the current page's path.

When using this approach, you'll still want to upload a fallback icon to http://www.yourdomain.com/favicon.ico for situations where someone is browsing or bookmarking non-HTML content (such as a PDF).

Let's Review: How To Do It, The Easy Way

  1. Create a 16x16 image. If you want transparency, use the PNG or GIF format.
  2. Convert your image to .ico format using a free service such as favicon.cc.
  3. Upload the new icon to http://www.yourdomain.com/favicon.ico . For finer control, use the code above to specify favicons on a page-by-page basis.

If you neeed help figuring this just contact me.
Allan Fine
http://executiveedge1.com/ 
403-246-7386 

No comments: