A BOZO FILTER for a Web page
There is no such thing as bad publicity
or so the common (commercially-driven) adage goes.
Yet, for some of us, an adage is not equivalent to a truism.
Introduction
The Web is so open that information made available to one group is immediately available to all, independent of its relevance to the broader community. And while few of us would choose to limit the access to information to those who are honestly interested, it remains that there are visitors who range from the uncouth to the predatory. Like the politician who occasionally experiences an unwelcome endorsement, there will be pages which receive visitors through unwelcome links. I will leave it to your imagination as to what sort of pages you might not appreciate posting links to your page.
The BOZO FILTER was created for the victims of such predatory pages. It enables you to specify a list of URLs from which you do not wish to receive visits. It is implemented in JavaScript and so only works against browsers which understand that language, but as that represents a growing number of the browsers, the filter should be fairly effective.
Demonstration
I created a page, called filter, which has a bozo filter installed which prevents this present page (which servers as the bozo page) from branching to it. You are kicked back here (with a message telling you what is happening), if you try to branch from here to the page, filter.
On the other hand, the page filter does not block the page called friend. So you can branch to filter from the page friend.
Try it and see the difference.
Implementation
It is easy to implement. Copy the script below and past it onto your own page. It should be placed between the line which says
and the one which says
Then edit the following lines:
- the one which specifies the number of URL bozos you wish to block,
e.g., var numb =4
- the ones specifying the (absolute) URLs themselves,
e.g., bozo[1] = "http:// ....".
Add as many as you wish (incrementing the number), but make sure the total number is the same as the numb variable.
The Script
The script to be copied and pasted follows:
Send any comments or suggestions to the author at:
Home | Alistair B. Fraser | alistair@fraser.cc