nsIApplicationCacheNamespace 编辑
netwerk/base/public/nsIApplicationCache.idl
Scriptable 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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论