IntroductionIt is important for enterprise customers to deploy Java applets or JavaBeans using Java Plug-in within their companies. Disk caching is essential in making deployment of client-side applications easier. Disk caching allows applets or beans to be downloaded into the disk cache of the web browser in the user machine. Java Plug-in can download and update applets or beans according to the disk caching policy as configured in the browser, instead of downloading the applets or beans every time an HTML page is encountered by Java Plug-in.. Java Plug-in has full disk caching
support. This document specifies how disk caching
works in different browser
environments. How Java Plug-in Supports Disk CachingJava Plug-in supports Internet Explorer and Netscape Navigator on various Win32 platforms and Solaris platforms. Because browsers on different platforms implement caching differently, there is no generic mechanism to access information within the browser's cache. Instead, you will want to know how each browser accesses its cache and how Java Plug-in accesses information from it. When a browser needs to download a file through a URL connection, it normally will first check its cache and its caching policy to see if a new version needs to be downloaded. If so, the browser will download the file into the cache, and then read the files directly from the cache. Java Plug-in provides disk caching support by using the browser's application interface (API) to download the file through HTTP. When a file needs to be downloaded from a URL using Java Plug-in, Java Plug-in will first try to download the file through the browser API. If this operation succeeds, the file will be downloaded by the browser into the browser's cache, and Java Plug-in will obtain a stream of data from the cached file. If this operation fails, Java Plug-in will make a URL connection itself using the proxy configuration in the browser. Currently, disk caching support is triggered automatically only when a file with .class/.jar extension is downloaded through HTTP. If a file with another filename extension is downloaded through HTTP, Java Plug-in will make a URL connection itself using the proxy configuration in the browser. Disk Caching Policy Support in Java Plug-inJava Plug-in supports all disk caching policies that are supported in both Internet Explorer and Netscape Navigator. The disk caching policy can be configured in the user preference dialog in both browsers. Currently, three different kinds of disk caching policies are supported:
When the disk caching policy is changed in the browser, it will take effect the next time a URL connection needs to be made from Java Plug-in. Users can adjust the size of the cache from the user preference dialog in the browser. Notice that disk caching support may not work if the cache size is too small for downloading applets or beans. In this case, disk caching may fail and Java Plug-in will make a URL connection itself using the proxy configuration in the browser. In addition, if the cache size is too small and an applet needs to be downloaded into the cache, it may result in the browser pruning existing downloaded applets or beans in the cache. The order of pruning in the cache is dependent on each browser's implementation. Thus it is important to make sure that the cache size of your browser is properly adjusted. For more information about the disk caching policy
in your browser, please consult the user guide for
your browser. Conclusion
Users can take advantage of Java Plug-in disk caching
transparently whenever a CLASS/JAR file is
downloaded through HTTP. Java Plug-in
recognizes and works seamlessly in your intranet
environment with your browser's disk caching
policy. | ||||||
|
| ||||||||||||