nsIApplicationCacheNamespace 编辑

netwerk/base/public/nsIApplicationCache.idlScriptable This interface represents an application cache namespace. 1.0 66 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

AttributeTypeDescription
dataACStringData 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.
itemTypeunsigned longA bit field indicating one or more namespace types. Must be one or more of the constants defined under Constants on this page. Read only.
namespaceSpecACStringThe prefix of this namespace. This should be the asciiSpec of the URI prefix. Read only.

Constants

ConstantValueDescription
NAMESPACE_BYPASS1Items matching this namespace can be fetched from the network when loading from this cache. The data attribute is not used.
NAMESPACE_FALLBACK2Items 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_OPPORTUNISTIC4Items 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:85 次

字数:5098

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文