Not found 404 error pages

From MozillaZine Knowledge Base
Jump to navigationJump to search

Finding 404 errors on web pages

There are a number of methods and extensions that will help you find pages with bad links:

  • "LinkChecker" extension provides error indications and coloring on the web page itself to help you identify where the problem links are.
  • "W3C Link Checker looks for issues in links, anchors and referenced objects in a Web page, CSS style sheet, or recursively on a whole Web site and is invoked from a web page. The listings are oriented to the source code itself rather than the visual display.

You can use an extension or a bookmarklet to keep your page with the 404 error from being hidden while further checking on links as you will probably be after more than one bad link.

  • an extension such as "Tabloc "
  • a bookmarklet has far less overhead than an extension, can usually be run on any browser and still work on those browsers after browser version updates. See code for a bookmarklet below.

Dealing with bookmarks and web pages providing 404 errors

If the bookmarks are not important you might simply delete them if not wanted. But keeping the bookmark even if invalid may still be useful in finding information at a later time, or attempt to find the new location of a web page.

Sometimes the page you are looking for was not a permanent link and you may use the search form on the page you brought up to find what you are looking for.

Frequently you can find the current web page by first finding the old page at, which may be good enough, and from there find the current site using page title and phrases from the archived page to search for the current page. If the not found page does not get redirected to a show a different url on the location bar, the "archive:" bookmarklet below will help find the the archived page.

Even if the location bar does not show the original location, there may be a link within the redirected to page that provides that information or where to look.

It the bookmark has not been put into a bookmark folder it might not be important and you might simply delete items such as news stories which might not be worth the effort, and might not be freely available anyway. Other pages hard to track down are .asp and .aspx page created on the fly by servers and frequently not archived.

Name: archive: Internet Archive Wayback Machine
Keyword: archive:
Location: javascript:location%20=%20'*/'+location;%20void%200
Description: Wayback Machine at for use from a current or Not Found page. (also see a:)
Name: a: Archive for specified url using Wayback Machine
Keyword: a:
Description: Also see archive: which will check from a current or Not Found page.

The first bookmark above involves JavaScript so is a bookmarklet and has a keyword to simplify usage, the second bookmark has substitution and has a keyword assigned to the bookmark to simplify usage.

Name: NT: New Tab (Opens links in a New Tab)
Keyword: NT:
Location: javascript:(function(){var%20a=document.getElementsByTagName('a');for(var%20i=0,j=a.length;i<j;i++){a[i].setAttribute('target','_blank');var%20img=document.createElement('img');img.setAttribute('class',%20'new-window');img.setAttribute('src','data:image/gif;base64,'+'R0lGODlhEAAMALMLAL66tBISEjExMdTQyBoaGjs7OyUlJWZmZgAAAMzMzP///////wAAAAAAAAAAAAAA'+'ACH5BAEAAAsALAAAAAAQAAwAAAQ/cMlZqr2Tps13yVJBjOT4gYairqohCTDMsu4iHHgwr7UA/LqdopZS'+'DBBIpGG5lBQH0GgtU9xNJ9XZ1cnsNicRADs=');img.setAttribute('style','width:16px!important;height:12px!important;border:none!important;');a[i].appendChild(img);}})();
Description: This bookmarklet prevents the current page from being buried or having to be reset by forcing links to be opened in a new tab.

See Keyword Shortcuts for more information on creating and using keyword shortcuts, and bookmarklets.

See also

External links