Full save ignores comment tags

Gavin Wraith gavin at wra1th.plus.com
Mon Jan 6 19:29:54 GMT 2014

In message <be73ccc553.ricp at user.minijem.plus.com> you wrote:

> It would appear that doing a "full save" will save images even if
> their image  tags have been commented out. Of course the comment
> delimiters will be left in the html.
> I also noticed that if two instances of the same image appear on a
> page using exactly the same URL, they are saved as two separate files.
> Netsurf saves the inventory so this could be avoided.
> Just wondering of this behaviour is a) deliberate and b) desirable?
> The reason is that I commented out some lines specifically to avoid
> getting duplicate images and it didn't work.

A long while ago I wrote an application, FewerGif, for removing
redundant gif files produced by TechWriter/EasiWriter when it exports a
document to HTML (see http://www.wra1th.plus.com/sundry.html ). This
could fairly easily be generalised to work for the results of a "full
save", with any kind of image. Whether it is worth the effort is another
matter. FewerGif uses certain facts about Lua: a) files of any size can
be loaded as strings and b) string comparison is very fast, being just a

Gavin Wraith (gavin at wra1th.plus.com)
Home page: http://www.wra1th.plus.com/

More information about the netsurf-users mailing list