An automatic browser Web cache resizing system allows a browser to adjust its
Web cache size to its environment automatically. When the browser starts up, the
browser examines the host computer's hard drive for the amount of the available
free space and allocates the maximum reasonable amount of the free space on the
hard drive for the Web cache that it needs to run efficiently. During the browser's
shutdown sequence, it optionally reexamines the free space on the hard drive and
gives up as much of its allocated Web cache space as it can. Every time the browser
writes to or reads from the Web cache, the browser checks to see if its Web cache
allocation is needed for free space. If the browser sees that the amount of free
space is low, it will give up some of its Web cache space that it allocated. Another
preferred embodiment of the invention integrates the invention with the operating
system of the host computer. The browser requests memory from the operating system.
The browser can designate the allocated memory as not being critical and can be
recovered by the operating system if the operating system needs part or all of
the memory. The browser can optionally designate that a part of the memory allocation
request is critical and the remainder is not critical.