By Stan
Grabowski,
Website Coordinator for Manufacturing-Works
Please visit the previous articles for some background:
- Intro
- Web
standards
- Testing your site
Make your website “fail gracefully”
"Failing gracefully..." It's like tripping over a crack and instead
of landing on your face, you do a cart-wheel and land right back on your feet.
You never intended to trip, but you didn't get hurt. But how could a website "trip?"
Depending on how fancy your website is, with all its bells and whistles, your
site may be set up to fail in a browser that doesn't work properly. The bigger
they are the harder they fall...
...but it may not hurt as much if you have a safety net to fall into.
I was recently talking to someone who's website has drop-down menus.
Their
menu had the top most option, such as "About Us" and more options would show
up when you put your mouse over the "About Us". From there you could navigate
to the other sub-categories of the About Us section. It seemed to work just
fine, until I disabled JavaScript. I was then stuck on the home page. I could
not reach those sub-menu options, and there was no "About Us" page either.
The visible "About Us" option was there merely to trigger the sub-menu; it
did not link to anything.
So I'm stuck on the home page...
Now this was a deliberate problem I got myself into. I disabled the JavaScript.
But JavaScript is not always available for everyone in every situation. The
script may not work in a specific browser, or maybe the user is on their Blackberry
or other handheld device. Maybe the user is a search engine!
Search engines
can't utilize JavaScript or Flash, so it would be stuck on the home page with me.
Drop down menus are often done with either JavaScript or Flash; neither of
which are search-engine friendly. When a menu is built with JavaScript, it
only exists in a visitors browser. Search engines
don't use a mouse to navigate your site, so they will never see those drop-down
options, and cannot follow those links to those pages. Search engines also
cannot use Flash. If a search engine can't navigate your site, then your pages
will not end up in the search engine's index, and no one will ever see those
pages when they search.
You should think of JavaScript and Flash as "added
frills," not a "required feature" of your site.
All the information
and content of your site should always be accessable with, or without Flash
and JavaScript.
Solutions:
If your site must have drop down menus, consider these options:
- Have a site map linked off of every page. The site map should have links
to every page on your site. If a search engine finds your site map, it
can find every page on your site.
- Have a "text only" version of the menu at the bottom of the site. Make
sure every page can be reached through a normal text link.
- Use a CSS drop down menu. The downside of this is that the drop down options
won't work in old versions of Internet Explorer (IE6 and before), but they
are search engine friendly. Read this article on CSS
Dropdown Menus for a good example.
- Learn proper
JavaScripting methods (which can be a bit of a task) and check out this
article on Dropdown
Menus.
Basically, you need to plan to fail sometimes. Make sure your site is still
usable when Flash or JavaScript does not work.
See this topic in action:
I've built a demo of what I've been talking about in this article.
Please
visit
the demo to see how a properly coded menu works versus an improperly coded
menu. Please read the notes for clarification.
Again, this is an extensive subject that cannot be completely covered here.
Feel free to contact
me if you are interested in learning more.
Recent Comments