SitePoint Sponsor

User Tag List

View Poll Results: Do you use <link rel="home|index|next|last|etc"> elements?

Voters
5. You may not vote on this poll
  • Yes, all the time

    3 60.00%
  • Some of the time, when I think they will come in useful

    1 20.00%
  • No, I don't think they're worth bothering with

    1 20.00%
  • No, I don't know anything about them

    0 0%
Results 1 to 18 of 18

Thread: <link> elements

  1. #1
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)

    <link> elements

    I've done some accidental research on <link> elements and search engines....

    I've used <link rel="home|index|next|last|etc"> for a long time, principally for people using accessibility software and Opera, and in the hope that other browsers would pick up on them in time, but I've always had a vague thought at the back of my mind that they might help search engines as well.

    And now, completely by mistake, I've found a bit of an answer. I had a set of pages where I'd set one of the <link>s but mistyped the URL. When I looked at my logs the other day, it showed that a few spiders had tried to access the (wrong) URL. So the spiders definitely can and do follow the hrefs given in <link> elements.

  2. #2
    SitePoint Zealot
    Join Date
    Sep 2009
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the poll makes me confused, what is that element for? is that for making a link??

  3. #3
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,084
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by theemerchant View Post
    the poll makes me confused, what is that element for? is that for making a link??
    http://www.w3.org/TR/html401/struct/links.html#h-12.1.2

    Section 12.1.2
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  4. #4
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by theemerchant View Post
    the poll makes me confused, what is that element for? is that for making a link??
    I guess you'll be going for option 4 then

    Potted summary:
    Within your <head>, you can include "site navigation links". The plan was that these would give user agents (ie browsers) a way to navigate the site without having to use the on-page menu. Unfortunately, the only browsers I've seen that actually implement this are Opera and Lynx. Firefox used to list the links but gave you no way at all of following them, but doesn't seem to even do that any more.

    The way it works is that you list a series of link elements in the page head. eg
    <link rel="home" href="/">
    <link rel="next" href="article16.htm">
    <link rel="copyright" href="/about/copyright.htm">
    and so on.

    The possible options for the "rel" attribute are: home, index, contents, search, glossary, help, first, previous, next, last, up, copyright, author.

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    To the best of my knowledge the only browsers that understand those links and use them as they are supposed to are Opera and iCab.

    If they are also recognised by search engines then that makes them more useful.

    It is a pity that so few browsers have fully implemented support for HTML 4.
    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="^$">

  6. #6
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I have made use of them in the past (though I've not noticed any SEO benefit), however I think they do have a genuine real-world use for navigating around large documents, especially research papers or specifications. If you take something like the HTML specification (where things are broken down into multiple pages and sections), having those link elements actually are really useful when trying to navigate around the website (I find them useful anyway!). Within large documents you could technically even link to an anchor fragment and thereby allow people to bounce up and down the page as required to find the key components they require. Just thought it was worth mentioning that it has some unconventional uses, I've found myself using a link with rel license as an active microformat in the head to direct to the creative commons license my site is bound by (and it's recognised by Firefox's microformat extensions)

  7. #7
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by Stevie D View Post
    ....
    The possible options for the "rel" attribute are: home, index, contents, search, glossary, help, first, previous, next, last, up, copyright, author.
    What about

    <link rel='stylesheet'
    <link rel='shortcut icon'
    <link rel='alternate'
    <link rel="EditURI"
    <link rel="canonical"
    <link rel="pingback"

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Mittineague View Post
    What about

    <link rel='stylesheet'
    <link rel='shortcut icon'
    <link rel='alternate'
    <link rel="EditURI"
    <link rel="canonical"
    <link rel="pingback"
    None of those create a menu entry the way that the ones previously listed do in those browsers that support them. The thread is specifically discussing those link tags that generate links in the browsers web page menu bar.
    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
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Agreed, if you wanted to list all the rel items which don't produce a menu you could also churn out sitemap, apple-touch-icon, Dublin and gawd knows whatever else.

    Ironically a few days ago I wrote an article examining all of the options relating to what you can place in a documents head (including the links in this topic).

  10. #10
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by herveleger View Post
    the only browsers I've seen that actually implement this are Opera and Lynx.
    iCab was the fhe first browser to implement this (to the best of my knowledge - at least I saw referencdes to iCab support prior to Opera implementing it).
    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="^$">

  11. #11
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I'm not sure who the first was Stephen, but this chart is useful in showcasing which browsers support which implementations:

    http://webcoder.info/reference/LinkBars.html

  12. #12
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by AlexDawson View Post
    I'm not sure who the first was Stephen, but this chart is useful in showcasing which browsers support which implementations:

    http://webcoder.info/reference/LinkBars.html
    Well according to the page you just linked to Lynx was first followed by iCab second.
    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="^$">

  13. #13
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    True, but I'm not sure as to how credible the information is (regarding who was first), I guess Lynx has remained relatively the same for years so it could be the first, but I'm not comfortable with just going on what that website says (as useful as the table explaining what browser supports what is).

  14. #14
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    The only ordering I am certain of is that iCab came before Opera - because I saw articles about it mentioning iCab before Opera implemented it. I was using Opera prior to that and saw it listed in the new features when I upgraded.

    I hadn't been aware prior to this thread that lynx supported it (must have it turned off in the copy that's been sitting on my computer - either that or the copy I have of Lynx actually predates that change - which doesn't mean it wasn't first since I haven't updated Lynx in I forget how long).

    That menu bar would be far more useful in a text browser so it quite probably was impllemented in Lynx or some other text browser first.
    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="^$">

  15. #15
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Mittineague View Post
    What about

    <link rel='stylesheet'
    <link rel='shortcut icon'
    <link rel='alternate'
    <link rel="EditURI"
    <link rel="canonical"
    <link rel="pingback"
    Yes, I could have been clearer - I was only referring to the <link> elements used for site navigation, not the various other uses. It's a shame that it has to be the same element in the same format being used in such completely different ways.

  16. #16
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Out of those the only one I use all the time is "index".

    None of my pages really fit the first/previous/next/last sequence. They're either standalone or parent/child. Although I suppose I could have the siblings call parent previous if I wanted to.

  17. #17
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Mittineague View Post
    Out of those the only one I use all the time is "index".

    None of my pages really fit the first/previous/next/last sequence. They're either standalone or parent/child. Although I suppose I could have the siblings call parent previous if I wanted to.
    The problem is that if you use them at all you really ought to use as many of them as possible since when the menu is displayed it actually displays all of the links with only those that you have specified being actually active so if you only specify one then you are including a lot of disabled links in the menu.
    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="^$">

  18. #18
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,191
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    In defense of my ignorance I've never browsed with the Navigation Bar when using Opera so I was unaware.

    This thread has opened my eyes and I'm sure glad I saw it.

    @felgall, Thanks for the heads-up. I enabled the Navigation Bar and saw

    Home
    Index
    Contents
    Search
    Glossary
    Help
    First
    Previous
    Next
    Last
    Up
    Copyright
    Author

    and sure enough, only index was doing anything. I don't know if I can get them all but I'm definately going to try to get a few more of them in now.


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
  •