Disabling Animated GIFs in VMS Netscape

One problem with using Netscape in a multi-user environment is due to continuously animated GIFs. The purpose of such GIFs usually seems to be advertising, so their inclusion on a page takes up CPU (and network bandwidth to the X-terminal if not run on the local screen) unnecessarily. This is exacerbated when the animation is out of view (eg. the window is iconised, or the animation is not scrolled into view), since the user may not even be aware that an animation is running and still consuming CPU (yes, Netscape isn't clever enough to realise that it needn't do this!).

Fortunately it is possible to patch Netscape to disable continuous animations. The animation will be displayed once and then will stop (it can be restarted by pressing the Reload button). This should work with all versions of Netscape (and maybe even other browsers) on all platforms, though it's probably most useful in multi-user environments (when the wasted CPU could be used by others), ie. Unix and VMS. I've applied the patch successfully on Alpha/VMS Netscape 3.0 (various betas), but have heard reports of its working on various Unices.

All that is needed is to change the strings "NETSCAPE2.0" and "ANIMEXTS1.0" (which are recognised in continuous GIF animations) to something else of equal length (I use "STOPGIFANIM"). In fact changing just "NETSCAPE2.0" seems to be sufficient for all the animations I've checked, but "ANIMEXTS1.0" is reported as another possibility.

Here are some details of applying this patch under VMS. It should be simpler on Unix (eg. using sed), where there are no record type complications. One may be able to get away with skipping the format conversions described below, but this is what I've done and it works well.

You should first check that the file is in VMS executable record format. DIRECTORY/FULL should show the record format as Fixed length 512 byte records. The standard decompressor marks the file as Stream_LF format (incorrectly, though it doesn't normally matter). To fix this use

$ SET FILE/ATTRIBUTE=(RFM:FIX,LRL:512,RAT:NONE) NETSCAPE.EXE
This "corrects" the attributes of the existing file - no new version is created. The file should then be converted to an editable format (this does, of necessity, create a new file).
$ CONVERT NETSCAPE.EXE NETSCAPE_NOANIM.EXE/FDL=SYS$INPUT
RECORD
    CARRIAGE_CONTROL        CARRIAGE_RETURN
    FORMAT                  VARIABLE
CTRL/Z ends the FDL file. It may take a few minutes to do the conversion (Netscape is big!).

Then edit (eg. with EVE) the file NETSCAPE_NOANIM.EXE. In the editor replace the strings "NETSCAPE2.0" and "ANIMEXTS1.0" with others of equal length (eg. "STOPGIFANIM"). If you have automatic word wrap enabled, it's probably safest to disable it (SET NOWRAP in Eve) before changing anything. SHIFT RIGHT n (n being the number of columns to shift) can help if the string is too far to the right to fit on the screen. When those strings have been modified, save the file and convert it back to executable (FIXED:512) format with:-

$ CONVERT NETSCAPE_NOANIM.EXE */FDL=SYS$INPUT
RECORD
    CARRIAGE_CONTROL        none
    FORMAT                  fixed
    SIZE                    512
(again terminated by CTRL/Z). The new file can be checked against the original with:-
$ DIFFERENCES/MERGED=0/MODE=HEXADECIMAL NETSCAPE_NOANIM.EXE -
                                        NETSCAPE.EXE

Run NETSCAPE_NOANIM.EXE and confirm that animations stop after one cycle. I have a couple of small examples (flame and TV) that you can try out.

You may also like to check out David Simmons' description of the hack.


Navigation links: [Home] [WWW Information]
HTML 3.2 Checked... Best viewed with ANY browser! Last modified: 9th October 1997.
Tim Adye, <T.J.Adye@rl.ac.uk>