Locking down Netscape Navigator - Part 2

Andrew J. Mutch amutch at tln.lib.mi.us
Mon Nov 3 16:43:21 EST 1997


Hi all,

As promised, this is the second installment in creating a KIOSK-type
browser.  First, a couple of qualifiers.

1)  This method does not restrict by IP address.  Please see the
directions on how to do this at:

http://northville.lib.mi.us/tech/lockin.htm

2)  This method does not disable CTRL and ALT keys.  These keys can be
disabled using javascript in NN 4.0 IF you use either a Signed Script or
run the page on a SSL Server.  Both methods involve processes I am not
completely familiar with and I have not personally tested either method.

What this will do is create a Browser window with only the ToolBar
enabled.  Users will not have any access to the file menus, preventing
them from altering the preferences and other settings.  As this kind of
mischief is the cause of most of our problems, this should cut-out some of
your headaches.  Also, unlike 3rd party software, this method is FREE.

HOW DOES IT WORK?
The following code uses Javascript to open a new window to a specific
page.  It then closes the "start-up" window, leaving the "new" window by
itself.  

IMPORTANT:  You must set the page which contains this script as the "home"
page which the browser opens to.  Otherwise, you will recieve an Alert
asking you whether you wish to confirm the closing of the window.  This
alert would allow a user to cancel the window closing and access the
"unsecured" browser.

The following is the HTML code to create this "log-in" page.  Modify it as
necessary to fit your library's standards.  The only "required" parts are
everything between the <script> tags and the <body + function> tag.  

<html>
<head>
<title>Name of Your Page</title>
<meta name="Author" content="Your Name">
<SCRIPT Language="JavaScript">
<!--
function WinOpen(){
      window.open("http://www.searchbank.com/searchbank/ndl_main","",
"status=yes,toolbar=yes,scrollbars=yes")
//set the address here to the page you wish to open to - also the 
//status setting is option, delete it if you do not want it to show

       timeoutID=setTimeout("WinClose()",1)
//the number after WinClose is the amount of time in milliseconds that the
//browser should wait before closing the first window
}
function WinClose(){
        window.close()
}
//-->
</SCRIPT>
</head>
<body onLoad="WinOpen()">
</body>
</html>

OK, once you have this page created, set it as your browser's "home page"
and give it a whirl.  BTW, if you have to change your browser's
preferences, you'll have to change the page itself, removing the WinClose
function, so that the initial window does not close.  I know it's a hassle
but hopefully, you won't have to do it too often.

This method works with Navigator 3.0 and 4.0 and IE 4.0.
Also, I'm working on web pages that explain this.

Let me know how it works for you!

Andrew Mutch
Northville District Library
Northville, MI




More information about the Web4lib mailing list