Properties:
Name | Type | Description |
---|---|---|
numTotal |
number | total number of total resources |
numCached |
number | total number of cached resource |
sizeTotal |
number | size in bytes of all resources |
sizeCached |
number | size in bytes of all cached resources |
Methods
(static) getNumCachedResources() → {number}
Returns the total number of cached resources
Returns:
- Type
- number
(static) getNumTotalResources() → {number}
Returns the total number of resources
Returns:
- Type
- number
(static) getResource(url, fallback) → {Resource}
Asynchronously loads a resource from the spedified URL and returns it.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url of resource to load |
fallback |
string | fallback URL if load of the desired url fails |
Returns:
- Type
- Resource
(static) getResourceList() → {Array.<string>}
Returns list of all resource urls
Returns:
- Type
- Array.<string>
(static) getSizeCachedResources() → {number}
Returns the total size in bytes of cached resources
Returns:
- Type
- number
(static) getSizeTotalResources() → {number}
Returns the total size in bytes of all resources
Returns:
- Type
- number
(static) prefetch(url) → {Resource}
Prefetches a resource.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url of resource to load |
Returns:
- Type
- Resource