Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

nsIApplicationCacheNamespace

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!

This interface represents an application cache namespace.
1.0
28
Introduced
Gecko 1.9.1
Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)

Application caches can store a set of namespace entries that affect loads from the application cache. If a load from the cache fails to match on an exact cache entry, the namespace entries are searched for a substring match.

Method overview

void init(in unsigned long itemType, in ACString namespaceSpec, in ACString data);

Attributes

Attribute Type Description
data ACString Data associated with the namespace, such as a fallback. How this attribute is used varies depending on the namespace type. If the data is a URI, this attribute should be the URI's asciiSpec. Read only.
itemType unsigned long A bit field indicating one or more namespace types. Must be one or more of the constants defined under Constants on this page. Read only.
namespaceSpec ACString The prefix of this namespace. This should be the asciiSpec of the URI prefix. Read only.

Constants

Constant Value Description
NAMESPACE_BYPASS 1 Items matching this namespace can be fetched from the network when loading from this cache. The data attribute is not used.
NAMESPACE_FALLBACK 2 Items matching this namespace can be fetched from the network when loading from this cache; however, if the load fails, the cache entry specified by the data attribute should be loaded intstead.
NAMESPACE_OPPORTUNISTIC 4 Items matching this namespace should be cached opportunistically. Successful top-level loads of resources in this namespace should be placed into the application cache. This can be combined with NAMESPACE_FALLBACK to provide a fallback entry in the data attribute.

Methods

init()

Initializes the namespace.

void init(
  in unsigned long itemType,
  in ACString namespaceSpec,
  in ACString data
);
Parameters
itemType
The namespace type.
namespaceSpec
The namespace's prefix.
data
The data to associate with the namespace.

See also

ドキュメントのタグと貢献者

 このページの貢献者: Sheppy, trevorh, Jürgen Jeka
 最終更新者: Sheppy,