Considerations for "Page Not Found" Errors Abstract: Good error messages are polite and informative. Polite means using simple language that does not imply the error is the users fault. Informative means suggesting steps on the error message page the user can take to correct the problem. It is inevitable that mistakes will be made on a website. Although no user wants their work interrupted with a page not found error, it does provide the website an opportunity to demonstrate the level of care taken to ensure a good user experience. A 404 Page Not Found error can be a rather helpless experience. This is why we recommend some of the following actions: Correcting mistakes automatically Avoiding difficult file names Explaining why links disappear Offering alternatives for finding the correct page Forcing Internet Explorer 5+ to display your 404 and not it's own Correcting mistakes automatically The friendliest thing a website can do in the situation where a page is not found is recognize the error and correct it so a user never knows. For this to take place problem URL's must be tracked to develop an understanding of what pages are being reached in error most often. That discussion is better left for another article, but some common mistakes such as file name misspellings can be fixed and redirected before the 404 error page is ever needed. Although it may seem a black art, it's not. Common problems like typing an extra "l" at the end of an "html" file name are easily spotted and quite common. Also, common file name misspellings can be found by looking through error logs and spotting them. For situations which are not so obvious, software can be written to scan parts of a website and give the user potential alternatives to the correct webpage. Although this does not "autocorrect" per-se, it does narrow the possibilities which will always help. There are situations that little can be done. Trapping the referring page (Such as using the "HTTP_REFERER" server variable) and automatically sending an email message to the Webmaster of the site is a basic step that can be taken and generally brings good results. A more complex situation such as typing "www.mysite.xom" is not something that a webmaster can manage. No contact can ever be made with the web server because the extension is incorrect. Solving this would require cooperation from large organizations but we feel it is worth mentioning to promote the idea. Avoiding difficult file names Long and complicated file names are a common reason that 404 errors are generated. Simple file names are easier to remember and easier to type. Unfortunately many content administration tools auto generate file names such as "2002ers33455_43549042.html" which are mostly useful as a copy and pasted link in an email or hyperlink on a website, but not much else. Not many people are going to remember a name like that. Some websites, such as news outlets, do not have a lot of choice because they create upwards of hundreds of new web pages a day. So avoiding difficult file names is not always possible but suggested. Explaining why links disappear The most common reasons for the 404 error message are: - The page was moved elsewhere on the site
- The website was redesigned and connections to older content was not made
- Another site linked to a page and got the link wrong
- The link was dated or the page simply no longer exists
- A search engine has an old index and hasn't updated
- The user typed the address incorrectly
We recommend listing these on the 404 error page to help educate users. A significant percentage of websites do no have error messages and here users can pickup a few tips that can be useful in the future. Offering alternatives to find the correct page Offering alternatives to help the user find the correct information is the single most important thing an error page can do. Before we list suggestions, don't redirect an error automatically to the home page. This is disorienting. We recommend the following be included on a website error page: - If you cannot script "targeted" alternatives, add a listing of the most common mistaken URLs on the website (studying log files highlights what errors are made the most)
- Offer a search field linked to the site's search engine: even when users can't guess the current URL, they may be able to specify a query to locate the desired information.
- Offer a link to the site map: this will help those users that might have been just looking for a particular section, say, the "Services" page
- Offer a link to an "About the site" page, if there is one
- Link to a contact form that the user can fill in to ask about what they were looking for
Forcing Internet Explorer 5+ to display your 404 and not its own Version 5+ of Internet Explorer has its own 'friendly' error messages built in. Some people who have designed their own custom 404s have found that IE ignores their page and displaying its own message. To get around this make sure that the size of your file is greater than 512 bytes. If you just add a graphic, you'll be well over that size, this way Internet Explorer choses your custom error instead of its own. Article by Isaac Ferreira, visit www.onlinetransmissions.com for related articles.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |
More How To Articles More By Developer Shed developerWorks - FREE Tools! | <a href="http://zeus.developershed.com/shonuff.php?blackbird=3853&zoneid=442&source=&dest=http%3A%2F%2Fwww.ibm.com%2Fdeveloperworks%2Fspaces%2Fjazz%3FS_TACT%3D105AGY31%26S_CMP%3DDEVSHED&ismap="><img src="http://images.devshed.com/corp/img/news/jazz01.gif" alt="developerWorks Jazz space" align="left"></a>You've heard the buzz about Jazz... want to know more about it from a developer's perspective? Check out the Jazz space on developerWorks. This space is an up-to-date resource for developers, including technical information about Jazz and products built on Jazz, like Rational Team Concert Express. The Jazz space includes content from a wide variety of sources, including links, feeds, and comments from experts. FREE! Go There Now!
| | | | Visit IBM developerWorks to download a free trial version of WebSphere Business Modeler Advanced V6.1.1, IBM’s premier business process modeling and analysis tool for business users that offers process modeling, simulation, and analysis capabilities. IBM WebSphere Business Modeler helps you visualize, understand, and document business processes for continuous improvement. FREE! Go There Now!
| | | | Download a free trial version of IBM Rational Software Analyzer Developer Edition V7.0 to identify bug defects earlier in the software development cycle. Rational Software Analyzer is an extensible software development solution that reduces the expense of bug-fixes by enabling static analysis code reviews and bug identification very early in the development cycle. FREE! Go There Now!
| | | | Join us for this web seminar to learn how you can defend your web applications from attack. Learn about the 3 most common web application attacks, including how they occur and what can be done to prevent them. We’ll also discuss manual versus automated approaches for scanning and identifying web application vulnerabilities and how IBM Rational AppScan, an automated vulnerability scanner, can help you automate more of what you are doing manually today. FREE! Go There Now!
| | | | Analysts, architects, and developers who have existing COBOL or PL/I skills and want to extend those skills to deploy new workloads on the mainframe can use the IBM Enterprise Modernization Sandbox for System z to find hands-on walkthroughs of common real world scenarios. The scenarios provide examples of how to rapidly design, create, assemble, test, and deploy high-quality Web, Web services, portal, and SOA applications for IBM CICS, IBM IMS, and IBM WebSphere Application Server. FREE! Go There Now!
| | | | Learn how to do more with your reusable assets with the free Rational Asset Manager eKit. The eKit includes demos on how Rational Asset Manager tracks and audits your assets in order to utilize them for reuse. Plus you’ll find white papers and a Webcast that discuss the challenges of a Service Oriented Architecture and how Rational Asset Manager can provide quick and effective solutions. FREE! Go There Now!
| | | | Join this Rational Talks to You teleconference on December 11 at 1:00 pm ET to get tips on building your own plugins with Rational Method Composer. Get your questions answered! FREE! Go There Now!
| | | | Join this Rational Talks to You teleconference on December 6 at 1:00 pm ET to participate in an agile application development discussion and get your questions answered on using IBM Rational Method Composer in a distributed environment.Get your questions answered! FREE! Go There Now!
| | | | Visit IBM developerWorks to try the IBM SOA Sandbox for process. The SOA Sandbox for process focuses on providing a trial environment with the necessary tooling and components required to gain a better understanding of business processes and how to best improve existing business processes to derive value quickly. FREE! Go There Now!
| | | | With IBM Rational Systems Development Solution, you can deliver products faster with higher quality. Within this kit, Read the “Model Driven Systems Development” white paper to see how to improve product quality and communication. Then check out the rest of the e-Kit to learn more about important topics that can affect the success of any software project through customer examples, tutorials, informative Webcasts, and best practices for designing, building and managing systems. From start to finish, at every stage in your projects, Rational Systems Development Solution can help your company reach its full potential. FREE! Go There Now!
| | | | All FREE IBM® developerWorks Tools! | |