# Patent

## Title
Automatic cache resizing system

## Abstract

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.

## Background
CROSS REFERENCE TO RELATED APPLICATION
This application is a Continuation of and claims priority to U.S. application Ser. No. 10/262,110, entitled Automatic Browser Web Cache Resizing System, filed 1 Oct. 2002, which is incorporated herein in its entirety by this reference thereto.


BACKGROUND OF THE INVENTION
1. Technical Field
The invention relates to the setting of Web browser operating parameters. More particularly, the invention relates to intelligently adjusting a Web browser's Web cache allocation to fit the browser's operating environment.
2. Description of the Prior Art
Web browsers have become a standard application for the majority of personal computers in the world today. The original concept for the Web browsers was that the typical user needed to have a browsing experience that was as trouble free as possible. The typical user does not want and does not need to know anything more about the browser's operations than entering Universal Resource Locators (URL) into the browser's location or address fields.
However, the reality of the personal computer world is that the majority of application programs require that the user or the installer have knowledge of the specific system that the programs are installed on. For example, the Apple Computer Incorporated Mac systems using Mac OS 9 require that the user or installer properly set the memory requirements for application programs depending on their expected use and available memory.
A Web browser requires the use of the host computer's hard drive for temporary caching of content (Web cache). The browser uses the Web cache area reserved on the computer's hard drive to store Web page content (e.g., HTML pages, JPEG and GIF images, etc.).
Web page content is stored in the Web cache area for quick access to recently visited Web pages. This speeds up the user's Web experience by skipping the step of waiting for a remote server to produce content that the browser already has stored in its Web cache. The user has a better Web experience because of the Web cache.
However, Web browsers require that the size of the Web cache be specified manually. The Web browser manufacturers set the Web cache size at the time of release to a value that they believe will suffice for the majority of users.
Referring to FIG. 1, Microsoft Corporation's Internet Explorer has a preference window 101 where the Web cache value is set to a default value of 10 MB 102. The preference window 101 allows the user to modify the Web cache value 102 as he sees fit. The typical user has no idea what the Web cache does for him, nor does he know how changing the Web cache value 102 will affect him.
With respect to FIG. 2, Netscape Communication Corporation's, Netscape Navigator provides a similar preference window 201. The browser's Web cache size is set to 7.6 MB as a default value 202 and is also modifiable by the user.
It would be advantageous to provide an automatic browser Web cache resizing system that dynamically sets the Web cache value for a browser. It would further be advantageous to provide an automatic browser Web cache resizing system that automatically adapts the Web cache size to the host computer's memory constraints.
SUMMARY OF THE INVENTION
The invention provides an automatic browser Web cache resizing system. The system dynamically adjusts the Web cache size for a browser. In addition, the invention automatically adapts the browser's Web cache size to the host computer's memory constraints.
A preferred embodiment of the invention 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. The browser then 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 to give the user and other application programs more space to use in its absence.
In a more advanced preferred embodiment of the invention, every time the browser writes to or reads from the Web cache, the browser checks to see if its Web cache allocation has gotten in the way of the user or other application programs. 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.
The user is allowed to select an option in the browser's preferences window that enables/disables automatic sizing of the browser's Web cache on startup.
Another preferred embodiment of the invention integrates the invention with the operating system of the host computer. At startup, the browser requests memory from the operating system which allocates memory from the host computer's storage device. 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 for other tasks or application programs when the amount of free space gets low or is depleted. The browser can optionally designate that a part of the memory allocation request is critical and the remainder is not critical.
The operating system notifies the browser that it has taken back memory and the amount recovered. When the browser sees that the operating system has notified it that a certain portion of its Web cache was reallocated, the browser adjusts its Web cache lookup table to the new Web cache size.
Yet another preferred embodiment of the invention dynamically allocates the browser's Web cache as the browser is operating. The browser manipulates its Web cache size while it is being used by the user. As the user increases/decreases his browser usage, the browser allocates/deallocates more memory for the Web cache to keep its performance consistent.
Other aspects and advantages of the invention will become apparent from the following detailed description in combination with the accompanying drawings, illustrating, by way of example, the principles of the invention.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a diagram of a prior art approach of manually setting a browser's Web cache size according to the invention;
FIG. 2 is a diagram of a prior art approach of manually setting a browser's Web cache size according to the invention;
FIG. 3 is a block schematic diagram of a flowchart for a preferred embodiment of the invention automatically allocating memory for a browser's Web cache according to the invention;
FIG. 4 is a block schematic diagram showing the partitioning of a host computer's storage device according to the invention;
FIG. 5 is a block schematic diagram of a flowchart for another preferred embodiment of the invention dynamically adjusting a browser's Web cache during runtime according to the invention;
FIG. 6 is a diagram of a preferred embodiment of the invention's user interface allowing a user to select between automatically or manually setting a browser's Web cache size according to the invention; and
FIG. 7 is a block schematic diagram of the interaction of another preferred embodiment of the invention integrated into a host computer's operating system and browser according to the invention.



DETAILED DESCRIPTION OF THE INVENTION
The invention is embodied in an automatic browser Web cache resizing system. A system according to the invention dynamically adjusts the Web cache size for a browser. In addition, the invention automatically adapts the browser's Web cache size to the host computer's memory constraints.
The invention provides a dynamically adaptive system that sets a browser's Web cache size automatically. The invention analyzes the host computer's hard drive and available memory on the hard drive to set the Web cache size to a value that offers a user the maximal benefit given the host computer's memory constraints.
A Web browser requires the use of the host computer's hard drive for temporary caching of content (Web cache). The Web cache area is generally static, meaning the Web cache area resides on the host computer's hard drive as a folder containing files that, when the Web cache is fully utilized, occupy the entire Web cache area. The browser uses the Web cache area reserved on the computer's hard drive to store Web page content (e.g., HTML pages, JPEG and GIF images, etc.). The Web page content is stored in the Web cache area for quick access to recently visited Web pages.
The browser speeds up the user's Web experience by skipping the time-consuming task of waiting for a remote server to produce content that the browser already has stored in its Web cache. The user feels that his Web response time is faster and has a better Web experience.
Referring again to FIGS. 1 and 2, a default Web cache size is set by manufacturer such as in Microsoft Corporation's Internet Explorer's preference window 101 and Netscape Communication Corporation's, Netscape Navigator's preference window 201. The purpose and use of the Web cache is beyond the typical user's grasp. Therefore, the typical user will never enter another value in his browser's Web cache entry area 102, 202. This means that the user's browser is not given the chance to perform at its maximal performance levels for the user's particular computer.
There are times when a technologically savvy user will reduce his Web browser's cache space to recover some memory from his hard drive when his computer starts to run out of space on its hard drive. However, the user must have the technical knowledge to understand the ramifications of such a change. The typical user does not have the background to even contemplate what is happening on a computer's hard drive.
The invention allows the browser to adjust its Web cache size to its environment automatically. The invention looks at the host computer's hard drive and analyzes the amount of free space available on the hard drive. The browser will attempt to allocate the maximum portion possible of the free space on the hard drive.
With respect to FIGS. 3 and 4, using the invention's basic approach, when the browser starts up 301, the browser examines the hard drive for the amount of the available free space 302. The hard drive 401 typically has a certain amount of space reserved for the operating system 402, the filesystem 403, and the remaining space 404, which is deemed free space. The browser then allocates (requests from the operating system) the maximum reasonable amount of the free space on the hard drive for the Web cache that it needs to run efficiently 303. For example, the browser can allocate a percentage of the free space.
The browser then operates normally 304. When the browser shuts down, it optionally reexamines the free space on the hard drive and gives up as much of its allocated Web cache space as it can to give the user and other application programs more space to use in its absence 305, before actually shutting down 306.
With respect to FIG. 5, in a more advanced embodiment of the invention, whenever the browser starts up 501, the browser examines the hard drive for the amount of the available free space 502. As above, the browser then allocates (requests from the operating system) the maximum reasonable amount of the free space on the hard drive for the Web cache that it needs to run efficiently 503.
Every time the browser writes to or reads from the Web cache, it checks to see if its Web cache allocation has gotten in the way of the user or other application programs 504. If it sees that the amount of free space has gotten dangerously small, it will give up some of its Web cache space that it allocated 504. This allows the browser to coexist with the user and other application programs. The browser can also allocate more memory to its Web cache during normal runtime to improve its performance 504.
When the browser shuts downs 505, it reexamines the free space on the hard drive and gives up as much of its allocated Web cache space back to the free space as it can, to give the user and other application programs more space to use in its absence 506. The browser then shuts down 507.
Referring to FIG. 6, the user can also be allowed to select an option in the browser's preferences window 601 that lets the browser automatically size its Web cache on startup 602. This gives the user the ability to manually customize his Web cache size, as with prior browsers, by disabling the automatic cache sizing option.
With respect to FIG. 7, another preferred embodiment of the invention integrates the invention with the operating system 703 of the host computer. At startup, the browser 702 requests memory from the operating system 703. The requested memory is allocated from the storage device 704 by the operating system 702. The browser 702 can designate the allocated memory as not being critical and can be recovered by the operating system 703 if it needs part or all of the memory for other tasks or application programs 701 when the amount of free space 708 gets low or is depleted. However, the operating system 703 must tell the browser 702 that it has taken back memory and how much. The browser 702 can optionally designate that a part of the memory allocation request is critical and the remainder is not critical, thereby allowing the browser 702 to retain a minimal amount of Web cache 707 to operate in.
The browser 702 knows that when it comes back to use its Web cache 707, that there is a possibility that part of the Web cache 707 may be missing. When the browser 702 sees that the operating system 703 has notified it that a certain portion of its Web cache 707 was reallocated, the browser 702 adjusts its Web cache lookup table (e.g., hash table) to the new Web cache size. For example, the Web content that was in the area of memory that was reallocated is removed from the lookup table.
Another preferred embodiment of the invention dynamically allocates the browser's Web cache 707 as the browser 702 is operating. The browser 702 can manipulate its Web cache size while it is being used by the user. As the user increases his browser usage, the browser 702 allocates more memory for the Web cache 707 to keep its performance consistent.
The browser 702 can also monitor the performance of its Web cache 707 by examining the amount of the Web cache 707 that is unused or used only once during a certain period of time. Using this information, the browser 702 releases Web cache space back to the operating system 703.
The invention can track multiple users' browsing habits and adjust its Web cache to a specific user's normal activity pattern. For example, some browsers maintain a separate Web cache for each user profile that has been created. Doing this improves the user's Web experience at startup. The invention can adjust each Web cache to each user profile.
Other browsers maintain a single Web cache that is used across each user session. Using this type of browser, the invention can adjust its Web cache at startup to the specific user that is logged on.
Although the invention is described herein with reference to the preferred embodiment, one skilled in the art will readily appreciate that other applications may be substituted for those set forth herein without departing from the spirit and scope of the present invention. Accordingly, the invention should only be limited by the Claims included below.

## Claims

1. An apparatus, comprising:
a storage device associated with a computer; and
means for automatically examining the storage device during the startup of an application having an associated application cache on the computer to determine tie amount of available free space on the storage device; and
means for automatically allocating a portion of the determined available free space to the application cache during startup and before normal runtime of the application.

2. The apparatus of claim 1, further comprising:
means for determining the amount of currently available free space on the storage device while shutting down the application; and
means for releasing a portion of the application cache back to the currently available free space.

3. The apparatus of claim 1, wherein the storage device comprises a hard drive.

4. The apparatus of claim 1, wherein the application comprises a browser application.

5. The apparatus of claim 1, wherein the computer comprises an operating system, and wherein the allocation means requests memory from the available free space from the operating system to assign to the application cache, and wherein the operating system allocates memory from the available free space.

6. A process for automatically setting a cache associated with an application on a computer, comprising the steps of:
automatically examining a storage device associated with the computer during the startup of the application to determine the amount of available free space on the storage device; and
automatically allocating a portion of the determined available free space to the application cache during startup and before normal runtime of the application.

7. The process of claim 6, further comprising the steps of:
determining the amount of currently available free space on the memory while shutting down the application; and
releasing a portion of the application cache back to the currently available free space.

8. The process of claim 6, wherein the storage device comprises a hard drive.

9. The process of claim 6, wherein the application comprises a browser application.

10. The process of claim 6, wherein the allocation step allocates a percentage of the available free space.

11. The process of claim 6, further comprising the step of:
automatically determining the amount of currently available free space each time the application writes to or reads from the application cache.

12. The process of claim 11, wherein if the step of automatically determining the amount of currently available free space sees that the currently available free space requires additional memory, a portion of the application cache space is released to the currently available free space.

13. The process of claim 6, further comprising the step of:
providing preference setting means for allowing a user to select an option for any of enabling or disabling the allocating step on startup.

14. The process of claim 6, wherein the computer comprises an operating system, and wherein the allocation step requests memory from the available free space from the operating system to assign to the application cache, and wherein the operating system allocates memory from the available free space.

15. The process of claim 14, wherein the allocation step designates the requested memory as not being critical and wherein the requested memory can be recovered by the operating system if the operating system needs part or all of the requested memory for other tasks or other application programs during normal runtime of the application.

16. The process of claim 15, wherein the operating system notifies the application that it has recovered an amount of memory from the requested memory.

17. The process of claim 16, wherein when the application sees that the operating system has notified it that a certain portion of its requested memory was reallocated and a new application cache size exists, the application adjusts its application cache lookup table to the new application cache size.

18. The process of claim 17, wherein any application content that was in the area of memory that was reallocated by the operating system is removed from the application cache lookup table.

19. The process of claim 18, wherein the application cache lookup table is a hash table.

20. The process of claim 14, wherein the allocation step designates that a portion of the requested memory is critical and the remainder is not critical.

21. The process of claim 6, further comprising the step of:
dynamically allocating space to the application cache from the available free space as the application is operating.

22. The process of claim 21, wherein the dynamically allocating step provides any of
allocating more memory for the application cache as a user increases application usage, and
releasing unneeded memory from the application cache as a user decreases application usage.

23. The process of claim 6, further comprising the step of:
monitoring the performance of the application cache by examining the amount of the application cache that is unused or used only once during a certain period of time.

24. The process of claim 23, wherein the performance monitoring step releases a portion of application cache space back to the currently available free space if an unacceptable amount of application cache space is unused or is only used once during the certain period of time.

25. The process of claim 6, further comprising the step of:
tracking a user's usage habits of the application and adjusting the application cache size to the user's normal activity pattern.

26. The process of claim 25, further comprising the step of:
storing a plurality of users' usage habits in separate user profiles; and
wherein the tracking step allocates and adjusts an application cache for each user profile.

27. The process of claim 6, wherein the process is implemented by a program storage medium readable by the computer, the program storage medium tangibly embodying a program of instructions executable by the computer to perform the process steps.