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! | Effective governance for lean development isn’t about command and control. Instead, the focus is on enabling the right behaviors and practices through collaborative and supportive techniques. Hear from Scott Ambler on how it is far more effective to motivate people to do the right thing than it is to force them to do so. Learn how to form a lightweight, collaboration-based framework that reflects the realities of modern IT organizations. FREE! Go There Now!
| | | | Download the Rational Application Developer (RAD) v7.5 open beta code and start developing applications for the JEE5 standard which features EJB3.0, JPA, JSF 1.2, JSP 2.1 and Servlet 2.5 standards. When you use this beta you will see how you can increase developer productivity for already existing applications with improved support for refactoring, as well as adding new features to existing applications. In addition, the beta provides tooling for JD Edwards, Oracle, SAP, Siebel and PeopleSoft to improve the developer productivity with these enterprise systems. FREE! Go There Now!
| | | | Visit IBM developerWorks to download the latest trial version of IBM Data Studio V1.1 at no cost. IBM Data Studio is a comprehensive data management solution that helps you effectively design, develop, deploy and manage your data, databases, and database applications throughout the data management life cycle utilizing a consistent and integrated user interface. Unlike other client-side data management solutions that focus on only one aspect of the application lifecycle or database administration, Data Studio complements the Rational Software Delivery platform, providing unparalleled flexibility for a heterogeneous data server environment across platforms. FREE! Go There Now!
| | | | Join this webcast to see how IBM Data Studio Developer and pureQuery can take the pain out of Java data access. uApplications developed using both Java and SQL have become a common requirement. Database connectivity using Java Database Connectivity (JDBC) to create an application is a multi-step tedious process, and tooling that covers both SQL and Java has been unavailable, until now. IBM Data Studio introduces the pureQuery platform: a high-performance, Java data access platform focused on simplifying the tasks of developing, managing, and optimizing database applications and services. 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 implement a build management system that uses and extends your existing automation technologies. This tutorial shows, step-by-step, how to install and configure IBM Rational Build Forge to manage builds for Jakarta Tomcat from source code. FREE! Go There Now!
| | | | Because access to government information continues to be an area of concern for many U.S. citizens with disabilities, the U.S. government enacted Section 508 of the Rehabilitation Act in 2001 to ensure that government agencies create accessible Web content, enabling all citizens to access the information they need. A fully accessible Web site makes Web content accessible to all individuals, including those with disabilities, who may be accessing Web content via a variety of user agents. Common user agents include standard Web browsers, text-only browsers, assistive devices and mobile devices such as cell phones or personal digital assistants (PDAs). FREE! Go There Now!
| | | | This whitepaper provides areas to consider when evaluating any software configuration management solution. It addresses how the IBM solutions (Rational ClearCase and Rational ClearQuest) meet the needs and requirements of both project leaders and developers to provide successful Software Change and Configuration Management. FREE! Go There Now!
| | | | Get a free trial download of the latest version of IBM Rational Method Composer V7.2 which helps you deliver customized yet consistent process guidance to your project teams and IT organization, and includes the latest version of IBM Rational Unified Process (RUP), which has provided process guidance to teams since 1996. FREE! Go There Now!
| | | | As businesses grow increasingly dependent upon Web applications, these complex entities grow more difficult to secure. Most companies equip their Web sites with firewalls, Secure Sockets Layer (SSL), and network and host security, but the majority of attacks are on applications themselves – and these technologies cannot prevent them. This paper explains what you can do to help protect your organization, and it discusses an approach for improving your organization’s Web application security. FREE! Go There Now!
| | | | All FREE IBM® developerWorks Tools! | |