O'Reilly logo

Rapid Application Development with Mozilla™ by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

16.5. Platform Configuration

Some scripting tasks inspect, manage, and update the state of the Mozilla Platform itself. To do that, internal aspects of the platform must be revealed via XPCOM interfaces. This topic covers the cache, file system directory, preferences, security, and user profiles.

16.5.1. Cache Control

The Mozilla Browser cache is intended to be transparent to all operations, but it is possible to interact with it if necessary. The cache is at work for all URL requests performed by the platform, unless it is explicitly avoided or turned off. Low-level access to the cache can be had via this XPCOM pair:

@mozilla.org/network/cache-service;1 nsICacheService

An object built this way also needs access to the constants provided by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required