Browser Basics: 
Errors

Title: Jan's Illustrated Computer Literacy 101
españolIcon: Change web
Did you want IE9+, Chrome, Firefox; Notepad? Icon: Change web



Errors occur in web pages with annoying frequency. (It's more annoying to the web authors than it is to you!)

You can not do much yourself about most of the errors. But it helps to know what is going on. Some error messages leave you totally in the dark.

There are three sources of errors.

  1. Author

  2. Server

  3. Scripting


Where you are:
JegsWorks > Lessons > Web

Before you start...

Project 1: Browser Basics    ConnectingTo subtopics
    IE InterfaceTo subtopics
    Navigating Arrow - Subtopic open
    icon-footprintTechniques
    icon-footprintFrames
    icon-footprintBack/Forward
    icon-footprintHistory
    icon-footprintProblems
    icon-footprintErrors
    icon-footprintForms
    icon-footprintFavorites
    icon-footprintOrganize
    icon-footprintAddress Bar
    icon-footprintAddress Paths
    PrintingTo subtopics
    SavingTo subtopics
    SearchingTo subtopics
    Summary
    Quiz
    ExercisesTo subtopics

Project 2: HTML BasicsTo subtopics


Search 
Glossary
  
Appendix


Author HTML Errors

Sometimes links on a web page go to destination pages that just don't exist. A link's address may be mistyped in the source code. Perhaps the page or image was moved or deleted by the site's webmaster, the person in charge of maintaining a web site. When a site is reorganized or files are renamed, it is hard to get all of the internal links changed to match. Perhaps the page has not been written yet but the navigation links are already in place.

If the browser cannot find the file, you will get an error message, either in a dialog box or in the browser.

TipIf you visit a page and find that a link does not work or if you experience some other problem with the pages, send a brief email to the webmaster of that site. There is often a link at the site that is specifically for reporting such problems. Report exactly which page has the problem and exactly what happened. Include the name and version of your browser and what operating system you are using. It does make a difference!

A webmaster may never know that a link is broken unless someone reports it, especially for links to other sites. Politeness works both directions.


Server Errors

Sending web pages out over the Internet is a complex process. There are many ways for it to go wrong. The server can be so overwhelmed with tasks that it just ignores your browser's request for a web page. Perhaps the web server is just having a really bad day!

The server can be mis-configured so that parts of the page are not sent out correctly, especially sound or embedded objects. Trying to fix one problem sometimes causes other problems!


Scripting Errors

Scripts are small programs that are part of web pages or are attached to them. A script might be written by the web author or it could be a server script written by someone else.

Scripts are used to validate your form entries (making sure a US zip code is exactly 5 numbers, for example). It's a script that opens a link in a new window. Cascading menus on a web page are created by a script. Many cool and helpful features of interactive web pages are handled by scripts. JavaScript and VBScript are two common languages for scripts on web pages.

Unfortunately these scripts are very picky, like any other computer program. A mis-placed comma or semicolon can cause complete failure. It can be horrendously difficult to debug a script (find the cause of an error).


Icon Step-by-Step 

Step-by-Step: Errors

 Icon Step-by-Step

What you will learn:

what to do about missing pages
what a 404 error means
what to do about a scripting error

 Start with: IE open to World Travel Inc.

Missing pages

  1. World Travel - Under ConstructionIn the left frame click on the link New Zealand.

    The new page loads in the right frame. Whoops. Lovely water background, but no information about New Zealand. How disappointing. At least you now know that the page has not been prepared yet.


  2. Dialog: Cannot find the fileIn the left frame click on the link Trip around the world. The file world.htm does not exist. You will see either a dialog box or a web page message. You cannot tell if the URL was mis-typed or if the page is planned but just not written yet. Humph!

    HTTP Error 404 Not Found


    404 error in IE5

    IE5  You will get more comments in Internet Explorer 5. The "File not found" part is hidden at the bottom of the message.

    Error 404 is the error code for a file that cannot be found. Sometimes such a page will say Not Found in English and not mention the code 404. You may can figure out what the problem with the address is and type it into the Address Bar yourself. If you really want to see the page, it might be worth some experimentation.

    TipIf the first part of the web address is wrong, then the server computer cannot even be contacted to look for the file. A similar dialog or message appears that refers to Cannot find server or Cannot connect to server. Sometimes this just means that the server was too busy. Refreshing the page (click the Refresh button) might catch the server in a position to let you in.

  3. In the address bar type the correct path and filename as follows -  http://www.jegsworks.com/Lessons/web/worldtravel/aroundworld.htm 

    world.htm - Under constructionThe file is displayed in the whole window instead of in the frame. It is another "under construction" page. All that work for nothing!

  4. Click the Back button to get back to the framed pages.


Script Error

A simple typing mistake can cause a script to fail.

  1. In the navigation frame on the left, hover over the link Computer course. In the Status Bar you don't see the URL of the link, but something about JavaScript:Status Bar meesage - javascript
  2. Dialog- Javascript errorClick on the link Computer course
    An error occurs. What message you get depends on what version of IE you are using.

    The error in this case is a missing character. Look at the Status Bar message. There is an single quote at the beginning of the URL (before http) but there is no closing single quote at the end of the URL (after com). The rules of scripting languages are firm - quotes must be in matched pairs! Whoops.
     
  3. Click on Yes so that other scripts on this page (that don't have errors) will still run. If you click No, even the good scripts won't work anymore.

      In IE5.5 if you check the item "Turn off script debugging" in  Internet Options...  |  Advanced , you get only a Status Bar message when there is a script error: Status Bar = Error on page.