Checking links

Check Links menu The Check Links menu contains functions to scan files and check that all links, HREFs, SRCs etc. as well as CSS links url("...") point to files which exist. The files which are scanned are the HTML and CSS files. For this to be useful the files in your home page folders must be mirrors of the files at your servers. If you use this function as intended you never have to worry about dead links between your files anymore.

It works as follows: In every file scanned Alpha looks for all link attributes: HREFs, SRCs, etc in the file. If you use the BASE element it will be noticed and used to determine to which URL a link is pointing. Everything inside comments is ignored.

For each link Alpha first determines where it is pointing. Links to remote servers, which you do not have a home page folder for, are ignored. Also, if you have a home page folder for http://www.net/~myplace/, links like http://www.net/file.html are ignored, as they are outside your home page. For all other links, Alpha checks if the file exist.

If any invalid links are found, a window is opened where the lines look as follows:

file.html                Line 8:   HREF="otherfile.html"
file2.html               Line 23:  (anchor missing) HREF="file.html#anchor"
folder:file3.html        Line 17:  (BASE used) SRC="pic/coolpic.gif"

In the first column is the name of the file with the link, including the path relative to the home page folder. In the second column is the line number where the invalid link is, and in the third column is the link itself. (anchor missing) means that the file exists but that the anchor is missing in the file. (BASE used) means that the file contains a BASE element. Use the up and down arrows to select a line in this window, and carriage return to open the file and select the line with the invalid link.

You can optionally check that the case of the links match the case of the file names on your disk. This can be useful as Mac file names are not case sensitive, while for example unix file names are. Therefore a link can work on your Mac but not work on a unix machine. Checking the case makes link checking slower and is therefore not done by default. See below how to enable case sensitive link checking.

Fixing a broken link

You can fix broken links by selecting a new one. To do this

When the broken link contains an anchor "file.html#anchor", Alpha checks if the new file contains that anchor. If it does, #anchor is added to the new link, otherwise not.

Fixing a link works as long as you do not make any other changes to the file first. Then Alpha may not find the line with the broken link.

Checking links with Big Brother

Big Brother is a shareware program by François Pottier, Francois.Pottier@inria.fr. You can get Big Brother from his home page.

The big advantage with Big Brother is that it can check all your remote links. It checks local links on your hard disk with about the same speed as Alpha, but Big Brother can run in the background while you do other things. Differences between Alpha and Big Brother are

Check Remote Links
To check remote links in the current window using Big Brother. Big Brother 1.2 or later is required to use this function. A list of all remote links in the current window is sent to Big Brother. Big Brother checks the links and sends the result back to Alpha, which displays the result in a window. If a page has moved to a new location the link in your HTML window is automatically updated. Don't make any other changes to the file while checking remote links, because then Alpha may not find the line with the link to update.
Use Big Brother
Marking this menu item to indicates that link checks will be done with Big Brother instead of Alpha. If this menu item is checked, files and folders will be sent to Big Brother when you check links.

Some settings are temporarily changed in Big Brother, when you send a file or folder to it. These are

Link checking preferences

You can set some preferences for how to check links in the dialog box Check Links... in the Preferences menu.

Check link prefs

Check anchors
When checked, 'Check links' will check that there is an anchor <A NAME="anchor"> in file.html if a link <A HREF="file.html#anchor"> points to it. By default anchors are checked.
Case sensitive checking (slower)
When checked, 'Check Links' will check that the case in the links match the case in the file and folder names. This can be useful as Mac file names are not case sensitive, while for example unix file names are. Case sensitive checking is slower, and therefore not done by default. If you send the files to Big Brother, Big Brother also uses this setting to decide if case sensitive checking should be made.
Bring Big Brother to front when checking links
If you use Big Brother to check links, this will determine if Big Brother stays in the background or not, when you send files to it. By default Big Brother is brought to the front.
Use Big Brother's link check options
When not checked, the settings for the two links checking options below will used instead of the corresponding options in Big Brother. By default Big Brother's settings are used.
Ignore remote links
The same as the corresponding option in Big Brother.
Ignore local links
The same as the corresponding option in Big Brother.

Previous page Next page