HTML and CSS Reference
In-Depth Information
Browsers may also use favicons in a bookmark menu. Currently, the favicon image
should be a 16×16 image, though larger image sizes may be supported in other situations.
For example, Apple devices support a relationship of apple-touch-icon to set a larger
57×57 PNG format icon
<link rel = "apple-touch-icon" href="/apple-touch-icon.png">
to be used on its mobile devices. This is just an example to illustrate that many browser- or
environment-specific uses of <link> relationships likely exist.
Finally, in some browsers if the rel attribute is set with the value of next (or, in other
cases, prefetch ) along with an href value of some data object, the browser will “prefetch”
the item in question during the idle time of the browser. If the content of the next page is
stored in the browser's cache, the page loads much faster than if the page has to be
requested from the server.
Mozilla-based browsers support this syntax already with a relation type of either next
or prefetch . For example, you might use <link> like this:
<link rel="prefetch" href="/images/product.jpeg">
This would be the same as providing a prefetching hint using an HTTP Link: header:
Link: </images/product.jpeg>; rel=prefetch
It is possible to prefetch a variety of objects in a page during a browser's idle time.
Consider the following example:
<link rel="prefetch" href="bigflash.swf">
<link rel="prefetch" href="ajaxlibrary.js">
<link rel="next" href="2.html">
While prefetching is only built into some browsers, it is possible using JavaScript to
preload objects as well. Regardless of the prefetch method, be careful not to disrupt the load
or use of a currently viewed page with preloading, and be mindful that you may be wasting
bandwidth on requests that are never used.
rev The value of the rev attribute shows the relationship of the current document to the
linked document, as defined by the href attribute. The attribute thus defines the reverse
relationship compared to the value of the rel attribute. Multiple values can be specified
and should be separated by spaces. Values for the rev attribute are similar to the possible
values for rel . They might include alternate , bookmark , chapter , contents ,
copyright , glossary , help , index , next , prev , section , start , stylesheet , and
subsection . HTML5 does not define this attribute—likely with good cause, because its
usage is quite rare and its value nebulous.
sizes This HTML5 attribute is used when the rel attribute has a value of icon to define
the size of the related icon in a Height × Width format. The attribute takes a space-separated
list if multiple forms are possible or takes the keyword any if size doesn't matter. See the
examples that follow for a demonstration.
Search WWH ::




Custom Search