SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)

    extra link rel's in <head> ?? purpose?

    Hey guys
    I think this is for Accessibility section, otherwise if I'm wrong just move, but I've only seen these on sites like those built by Mike Cherim:

    <head>
    lots and lots of stuff... and more stuff... and o my gawd lots of stuff...
    <link rel="stylesheet" href="blah.css" media="whatever" type="text/css">
    <link rel="home" href="nameofsite.com" type="text/html">
    <link rel="about" href="nameofsite.com/about" type="text/html">
    <link rel="help" href="nameofsite.com/help" type="text/html">
    </head>

    Okay, not 100% remembering about the mime-types listed on the last links but, these are like replicants of the navigation buttons, and wonder, what are they doing in the <head> and how does one access them??

    I'm been crawling some Mike sites recently and there're a lot of good ideas in there.

  2. #2
    SitePoint Guru
    Join Date
    Feb 2008
    Posts
    655
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The WC3 has an explanation here

    This is what they say about <link>
    User agents, search engines, etc. may interpret these link types in a variety of ways. For example, user agents may provide access to linked documents through a navigation bar.
    Also take a look at the technical details here.

  3. #3
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by w3c
    This element defines a link. Unlike A, it may only appear in the HEAD section of a document, although it may appear any number of times. Although LINK has no content, it conveys relationship information that may be rendered by user agents in a variety of ways (e.g., a tool-bar with a drop-down menu of links).
    I still haven't figure out why you would repeat the Home navigation button which is on the site. I cannot access on any of the <head> links. My browser needs a special toolbar? I still don't know how to access them. Or am I not meant to? Is it only for special user agents?

    *edit I should have been clear, I'm familiar with "stylesheet" links and have seen the idea of next and prev (although I've heard it doesn't work well cross-browser) but unfamiliar with repeating your navigation menu with them.

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use some of those on my blog, too. It's mainly a service to Opera and Lynx users, who can get an extra nav menu for pages that might be of interest.
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Guru
    Join Date
    Feb 2008
    Posts
    655
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [QUOTE=Stomme poes;3968041]I cannot access on any of the <head> links. My browser needs a special toolbar? I still don't know how to access them. Or am I not meant to? Is it only for special user agents?
    [QUOTE]

    Yes, they are extra information for the browser. Only certain browsers do anything with the information at the minute.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,871
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    The first browser I am aware of to implement support for that menubar was iCab. It has a specific list of about a dozen links that can go in the menu. The next browser I saw that implemented it was Opera which set up a slightly different list of links that you can create. The link names are defined by the browser, all you can control from within the page is where they link to.

    I think the idea was to provide a standard way of identifying specific relationships between the current page and selected other pages of significance on the same site.

    While all sites might have a home link somewhere on the site there is no standard way other than via this link tag of defining which page of your site you consider to be the home page (not necessarily the same page as the page people land on when they don't specify a page).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Ah, ok. Actually, I thought base did that (but also thought base was more for framed sites).

    So in Opera, if I go searching under View or somewhere, on a site which has these extra navigation links, I should find them listed like FF shows Default page style, Print, Handheld, etc?

    Anyway, thanks everyone for clearing this up. I think I'll not be adding these until I'm more familiar with which ones are even worth it or make sense to users.

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,871
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    If they are turned on then the browser display an extra toolbar with all the links in it at the top of the web page.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  9. #9
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    So in Opera, if I go searching under View or somewhere, on a site which has these extra navigation links, I should find them listed like FF shows Default page style, Print, Handheld, etc?
    Not that I know of. Instead, press Shift+F12 and select the Toolbars tab. Check Navigation Bar. I also check Show only when needed so it doesn't occupy valuable screen real estate on the majority of sites that don't offer this feature.
    Birnam wood is come to Dunsinane

  10. #10
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Ah, it's always showing all the defaults, and only is selectable when on a page like Mike's. I'm going back through Mike's pages and check the toolbar out.

    Thanks! Heh, I misread the Go Back A Page keyboard instructions for Opera 9.5 and thought it was CTRL + ALT + Backspace which is ReStart XWindows, whoops. : )

  11. #11
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The 'Back' function has several key bindings: Backspace, Alt+LeftArrow, Z (if you've enabled single-key shortcuts).
    Birnam wood is come to Dunsinane

  12. #12
    SitePoint Zealot Amenthes's Avatar
    Join Date
    Oct 2006
    Location
    Bucharest, Romania
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is one more particular case. If the value of the rel attribute is "next" or "prefetch", Firefox will load in background the address in the href attribute and store it in the cache while you are navigating the current page. More info here:

    http://developer.mozilla.org/En/Link_prefetching_FAQ
    I'm under construction | http://igstan.ro/

  13. #13
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone know - do these result in extra HTTP requests for each <link> tag?

    The pre-fetching advantage is interesting... the rest mentioned don't seem worth it if this creates HTTP overhead. Also does the Pre-Fetching occur at page load and slow the present page - or after? If it slows the current page there are easy ways to achieve the same thing with JavaScript and an IFRAME.

  14. #14
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The prefetch function in Firefox will cause one or more extra HTTP requests. (It will also artificially boost Firefox's numbers in statistics.)
    Birnam wood is come to Dunsinane

  15. #15
    Non-Member Musicbox's Avatar
    Join Date
    Nov 2004
    Location
    india
    Posts
    1,331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post

    <head>
    lots and lots of stuff... and more stuff... and o my gawd lots of stuff...
    <link rel="stylesheet" href="blah.css" media="whatever" type="text/css">
    <link rel="home" href="nameofsite.com" type="text/html">
    <link rel="about" href="nameofsite.com/about" type="text/html">
    <link rel="help" href="nameofsite.com/help" type="text/html">
    </head>
    what are the site url's ? where have you seen this ?

  16. #16
    SitePoint Wizard
    Join Date
    Jul 2004
    Location
    Minneapolis, MN
    Posts
    1,924
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In particular, setting the "next" is pretty useful for Opera's fast forward feature. It can often detect where to go next, but it's always good to set that value if possible on like paged articles and the like.

  17. #17
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    There is one more particular case. If the value of the rel attribute is "next" or "prefetch", Firefox will load in background the address in the href attribute and store it in the cache while you are navigating the current page. More info here:
    You know, I read about this a loooong time ago somewhere (where it also stated that nobody used it so it was currently worthless) where you could have the links in your <head> and in your anchors, rel="next" and rel="prev" for, like, an image gallery where the large images are full pages.

    Actually, I thought this would be great for comic strips. There is a comic I love and read, where the whole site was nastily built because the iStrip (the script that did what next and prev could have done if it worked cross-browser) screwed with the HTML. The web guy there responded by changing everything to tables so he could gain total control from iStrip. Whole thing's just sad.

    Quote Originally Posted by Musicbox
    what are the site url's ? where have you seen this ?
    Uh, the one in particular was the disability legal advocate site done by Mike Cherim, though I see it on many of his pages including his bloggitty-blog-blog-blog-withadog...
    Code:
            <link rel="shortcut icon" href="http://lflegal.com/wp-content/themes/legality/images/favicon.ico" type="image/x-icon" />
            <link rel="home" href="http://lflegal.com/" title="Home Page" /> 
            <link rel="sitemap" href="http://lflegal.com/sitemap/" title="Site Map" /> 
            <link rel="help" href="http://lflegal.com/site-help/" title="Site Help" />
            <link rel="search" href="http://lflegal.com/search/" title="Search" />
            <link rel="accessibility" href="http://lflegal.com/accessibility/" title="Accessibility" /> 
            <link rel="alternate" type="application/rss+xml" title="Law Office of Lainey Feingold RSS Feed" href="http://lflegal.com/feed/" />
            <link rel="pingback" href="http://lflegal.com/xmlrpc.php" />
    	<link rel='archives' title='September 2008' href='http://lflegal.com/2008/09/' />
    
    	<link rel='archives' title='June 2008' href='http://lflegal.com/2008/06/' />
    	<link rel='archives' title='May 2008' href='http://lflegal.com/2008/05/' />
    	<link rel='archives' title='April 2008' href='http://lflegal.com/2008/04/' />
    	<link rel='archives' title='March 2008' href='http://lflegal.com/2008/03/' />
    	<link rel='archives' title='October 2007' href='http://lflegal.com/2007/10/' />
    ...etc for like a gazillion lines...
    @ http://lflegal.com/?prefs=style

    Check out the different CSS styles you can click on including handheld. Unlike other buttons I've seen, these ones don't use Javascript but the back end (PHP in this case) to send new stylesheets, which I just love. So awesome.

    I'd like to use this idea for the (always and forever on hold) new site I made for my employer, which has white text on a dark background, which for me is easier to read than black on white, but there are just as many people who cannot read white on black, so to have another stylesheet people can just click on to ease their eyes is awesome, and doesn't rely on JS.

  18. #18
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,871
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Check out the different CSS styles you can click on including handheld. Unlike other buttons I've seen, these ones don't use Javascript but the back end (PHP in this case) to send new stylesheets, which I just love. So awesome.

    I'd like to use this idea for the (always and forever on hold) new site I made for my employer, which has white text on a dark background, which for me is easier to read than black on white, but there are just as many people who cannot read white on black, so to have another stylesheet people can just click on to ease their eyes is awesome, and doesn't rely on JS.
    A properly written stylesheet switcher that uses JavaScript doesan't rely on JavaScript at all. It just provides an alternate way of switching betweeen the styles instead of using the "Page Styles" sub-menu of the "View" menu which will list all of the alternate stylesheets even with javaScript off. Doesn't work in IE though so for that browser you need the JavaScript as well as the HTML code for the alternates.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  19. #19
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,893
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by kburb23 View Post
    Anyone know - do these result in extra HTTP requests for each <link> tag?

    The pre-fetching advantage is interesting... the rest mentioned don't seem worth it if this creates HTTP overhead. Also does the Pre-Fetching occur at page load and slow the present page - or after? If it slows the current page there are easy ways to achieve the same thing with JavaScript and an IFRAME.
    Apart from when Firefox prefetches the 'next' link, there is nothing actually happening - Opera and Lynx don't follow any of the links unless you tell them to.

    Firefox will only prefetch when it can do so without disrupting other HTTP requests (or CPU load?) - it won't start prefetching the next page if it's in the middle of downloading something heavy, it will wait until that has finished so that it is making good use of "dead" time.

    One aspect that I haven't really seen discussed, let alone answered, is whether search engines use these links when they are spidering, either to trawl new pages or to build up a relationship between existing pages in their index.

    I always use them on my websites, because it takes next to no time to build them in, and they might be useful to a few people - and next week, someone might write a Firefox extension that makes them useful to a load more people, and next month Microsoft might decide that they are going to be actionable in IE8 ... future-proofing possible avenues could will save a lot of work in the long run!

  20. #20
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    ^I'm guessing they can use the one called "sitemap".

    Felgall, if I have to use JS to get IE to obey, then why not just force it on the back end and be done with browser incompatibilities? For instance, it seems easier to use JAWS with IE than with Firefox. Seems I need to use fewer fingers for commands-- so here, avoiding JS seems rather nice.

  21. #21
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,871
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Felgall, if I have to use JS to get IE to obey, then why not just force it on the back end and be done with browser incompatibilities? For instance, it seems easier to use JAWS with IE than with Firefox. Seems I need to use fewer fingers for commands-- so here, avoiding JS seems rather nice.
    That is only one of many things with CSS that work in all browsers except IE7 and earlier. I just checked and IE8 does support alternate stylesheets defined in the HTML without the need for any JavaScript.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  22. #22
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Oh cool. That'll be nice.

  23. #23
    SitePoint Zealot Luke Morton's Avatar
    Join Date
    Jul 2005
    Location
    Essex, England.
    Posts
    125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does using links increase accessibility at all?
    Luke Morton
    UK Web Explorer| lukemorton.co.uk

  24. #24
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not really, but the can increase usability for some user groups.
    Birnam wood is come to Dunsinane

  25. #25
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    I just discovered they are great for hiding "Easter eggs" on your site, so long as you choose the appropriate name and not one that would confuse people. Since I never would use "Author" for anything, I've used that. hehehehe... so evil.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •