LINXCHEK.HTM
When a site is maintained using a plain-text editor or similar, rather
than a specialised page-set authoring tool, and especially when pages
are renamed or moved or removed and content is moved between pages, it
is necessary to ensure that all local links still point to pages and
anchors that exist, and that anchors are not duplicated within a page.
That is better done before the pages are uploaded, and without using a
Web-based service.
I like to write my own tools, because there is then the possibility of
adding other checks as required.
Some while ago I wrote a Pascal/Delphi program,
CHEKLINX, to do link/anchor checking; it is on my Web
site via <programs/00index.htm> and
<programs/32-bit/00index.htm>. It is fast, but its
parsing of HTML is pragmatic.
Recently I have added to my Web site another tool for the job, written
with JavaScript; it spiders by loading pages into an iframe and reading
the links and anchors arrays, data from which are stored for post-
spidering analysis.
It is in HTML page <URL:http://www.merlyn.demon.co.uk/linxchek.htm>,
which is intended to be, or become, self-explanatory.
Partly for bandwidth reasons, and partly because of "local-origin"
limits, while the page can be read by eyeball from the Web, its code can
only be executed from a local copy.
Currently, in XP sp3, with :
MS IE : Starts; gives error message
Firefox : Almost works (stops when nearly finished scanning my site)
Opera : Works.
Safari : Works.
Chrome : Works. Fast.
Tests in non-XP, and in non-Windows, could be interesting.
I'm still considering the IE & FF situation. The cause in FF could be
something (but no more) like a different interpretation of the "same
domain" policy.
Comment? How about in UNIX or Mac, etc.?
--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk IE7 FF3 Op9 Sf3
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
date: Tue, 27 Oct 2009 22:44:59 +0000
author: Dr J R Stockton
|