Optimize favicons

Last update : March 21, 2016

Favicons plugin by Telegraphics

Favicons plugin by Telegraphics

Favicons (.ico files) are the little pictures at the left of the URL on the address bar of the browser. Favicons are an excellent free branding tool for webmasters and blog owners. They help you create brand awareness. Favicons are downloaded by each new visitor to a website. Favicons are extremely important because they are requested before any other components by the browser. By optimizing faveicons, you reduce bandwidth costs and server load.

With the code

<link rel="shortcut icon" href="chateau.ico" />

you can reference any location for the favicon. If it is absent, the Browser tries to fetch it from the domains root instead and each time the browser requests this file, the cookies for the server’s root are sent.

An outstanding tutorial how to include favicons on websites and especially in WordPress blogs is shown at MaxBlogPress. There are various free tools available to create favicons. A plugin for Photoshop to create and optimize favicons is available from Telegraphics, free software by Toby Tain.

Thera are also numerous online webtools available to create and optimize favicons, for example :

Some useful links to websites with more information about optimizing favicons are listed below :

Optimize png images

PNG (Portable Network Graphics) is a bitmapped image format that employs lossless data compression. PNG was created to improve upon and replace GIF (Graphics Interchange Format) as an image-file format not requiring a patent license.

PNG supports palette-based images, grayscale images, and full-color non-palette-based RGB[A] images (with or without alpha channel). PNG uses a non-patented lossless data compression method known as DEFLATE, which is the same algorithm used in the zlib compression library.

The first version of the PNG specification was released on October 1, 1996 as a W3C Recommendation.

Various tools are available for optimizing .png files; they do this by :

  • removing ancillary chunks
  • reducing color depth
  • optimizing line-by-line filter choice
  • optimizing DEFLATE compression.

In general one must use a combination of 2 tools in sequence for optimal compression: one which optimizes filters and removes ancillary chunks, and one which optimizes DEFLATE.

Some common tools are :

  • OptiPNG
  • PNGOUT
  • Pngcrush
  • PngGauntlet

There are several online tools available on the web to optimize .png files :

  • PunyPNG, compression and image optimization tool developed by Gracepoint Berkeley
  • Smush.it, by Yahoo Developer Network

A list of some useful tutorials about image compression is shown below :

Hide text with CSS

Sometimes you need to use an image, with text, for the background of an input button or an image link. This can be the case when you want to have a regular value in a button so that screen readers and people surfing without CSS can still figure out what the input says.

To hide the text with CSS, there are several possibilities :

  • set the font-size value to zero : the CSS specification does not indicate how browsers should display text when the font-size is set to a value of zero; many browsers handle it unpredictably
  • set the color of the text to transparent : it works in new browsers, including IE 9, but not in older IE versions
  • position the text out of the screen with left:-9999px or text-indent:-9999px
  • set the text invisible with span {display:none;} or span {visibility:hidden;}

The W3C published a technique using CSS to hide a portion of the link text as part of Techniques and Failures for Web Content Accessibility Guidelines 2.0.

Breadcrumbs

Breadcrumbs are navigational links that appear usually below the page header. They provide a hierarchical path that can assist users in orienting themselves within a site.They do not necessarily follow the directory structure. The term comes from the trail of breadcrumbs left by Hansel and Gretel in the popular fairytale.

Facebook HTML5 Resource Center

In 2011, Facebook launched a HTML5 web portal to show developers how to build amazing products.The following topics are covered :

  • Build : Learn the tricks of the trade to building the most compelling experiences
  • Test : Utilize a wide array of tools to help ensure your experiences are consistent across browsers
  • Distribute : Utilize Facebook and other channels to distribute your app to a large audience
  • Showcases : View examples and learn how to use web standards such as HTML5, CSS3, and Javascript to deliver rich experiences in your website

The Friend of a Friend (FOAF) project

 

Friends of a Friend

The Friend of a Friend (FOAF) project is creating a Web of machine-readable pages describing people, the links between them and the things they create and do. The FOAF project began early in 2000 as an experimental linked information project, created by Dan Brickley and Libby Miller.

The primary technical documentation for the core FOAF vocabulary is the FOAF specification. The FOAF Wiki and documentation webpages provide more informations about the project.

Accesskey’s

Accesskey’s allow a computer user to jump to a specific part of a web page or to a link via the keyboard. In most web browsers, the user invokes the access key by pressing Alt (on PC) or Ctrl (on Mac) simultaneously with the appropriate character on the keyboard. The acceskeys are declared as follows :

<a href="index.html" accesskey="h">Home</a>

The use of the following key-mapping is common :

  • S – Skip navigation
  • 1 – Home page
  • 2 – What’s new
  • 3 – Site map
  • 4 – Search
  • 5 – Frequently Asked Questions (FAQ)
  • 6 – Help
  • 7 – Complaints procedure
  • 8 – Terms and conditions
  • 9 – Feedback form
  • 0 – Access key details

xmlns : XML-namespace

XML namespaces, tagged xmlns, are used for providing uniquely named elements and attributes in an XML document. An XML instance may contain element or attribute names from more than one XML vocabulary. If each vocabulary is given a namespace, the ambiguity between identically named elements or attributes can be resolved.

A namespace name is a uniform resource identifier (URI) and describes a resource under the control of the author or organisation defining the vocabulary, such as a URL for the author’s Web server. It is however not required to use the URI to retrieve informations. The URI is treated as a string and describes the namespace to human readers. Despite the absence of any formal relationship of the URI with the HTTP protocol, the use of an URL form is common.

It’s not required that a document is available at the named address, but one convention adopted by developers is to place a Resource Directory Description Language (RDDL) document at the location of the URI.

The default namespace is declared as :

<html xmlns="http://www.w3.org/1999/xhtml">

The Facebook namespace is declared as :

<html xmlns:fb="http://ogp.me/ns/fb#">

To use both namespaces in one document, the declarations are combined :

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">

Further informations about namespaces are available at the following links :

Google Web Toolkit, Google Doctype, Closure Tools

Closure Logo

Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. GWT is open source and used by thousands of developers around the world.

Google Doctype is an open encyclopedia and reference library.

The Google Closure Tools help developers to build rich web applications with JavaScript that is both powerful and efficient. The Closure tools include:

  • The Closure Compiler compiles JavaScript into compact, optimized and high-performance code
  • The Closure Library is a broad, well-tested, modular, server-agnostic and cross-browser JavaScript library.
  • The Closure Templates are a client- and server-side templating system that helps developers to dynamically build reusable HTML and UI elements.
  • The Closure Stylesheets is an extension to CSS that adds variables, functions, conditionals, and mixins to standard CSS.
  • The Closure Linter ensures that all JavaScript code follows the guidelines in the Google JavaScript Style Guide.
  • The Closure Inspector is an extension to Firebug, the Firefox debugger extension.

The Google Closure Website provides FAQ’s, a Blog and other resources about Closure tools. The Google Doodle “Happy Holidays 2011”, created by software engineer Nathan Naze, is based on Closure.

reCAPTCHA

reCAPTCHA is a free CAPTCHA service provided by Google that helps to digitize books, newspapers and old time radio shows.

To archive human knowledge and to make information more accessible to the world, multiple projects are currently digitizing physical books that were written before the computer age. The book pages are being photographically scanned, and then transformed into text using “Optical Character Recognition” (OCR). One problem is that OCR is not perfect.

reCAPTCHA improves the process of digitizing books by sending words that cannot be read by computers to the Web in the form of CAPTCHAs for humans to decipher.
Each new word that cannot be read correctly by OCR is given to a user in conjunction with another word for which the answer is already known. The user is then asked to read both words. If they solve the one for which the answer is known, the system assumes their answer is correct for the new one. The system then gives the new image to a number of other people to determine, with higher confidence, whether the original answer was correct.

The technical backround of this technique has been published in a paper in the Science Magazine, Vol 321, 12 September 2008.