Karakas Online

3.4. Restore HTML sessions

As said above, Netscape 4.x is old. And every so often it encounters some code it cannot handle , even worse: it crashes. This will of course happen exactly when I will have 20+ HTML sessions open, tracking all hyperlink branches of some original interesting page I have long forgotten. Inline graphic

It is a pain to restore all lost HTML sessions after a browser crash. Wouldn't it be nice if we could keep track of all visited URLs in a text file, then, after restarting the browser, just type a command that will open them all, each one in its own browser window? In fact, this is what the following script does:

#! /bin/bash
# Remote invocation of my favorite URLs in netscape.
#
# Motivation: netscape sucks too often. I _had_ to find
# a way to load my lovely URLs without much typing.
# Now, just typing "netscape-recover" will do the trick.
#
# Enter all the URLs you wish to recover in URLS_Netscape,
# one URL per line.
URLS_Netscape="URLS_Netscape"
for url in `cat $URLS_Netscape`; do
  Netscape -remote "openURL($url,new-window)"
done

The remote invocation of Netscape is described in detail in Remote Control of UNIX Netscape, by Jamie Zawinski.