The CT
plugin tests how long an item stays in the browser's cache.
Given a URL, this plugin loads the specified URL and measures how long it took to load.
You can use the results of this plugin to determine how cacheable a URL is across browsers and over time.
For information on how to include this plugin, see the Building tutorial.
Usage
This plugin requires a server-generated JavaScript file that calls
BOOMR.plugins.CT.loaded
with the server's timestamp.
This file is specified as CT.cached_url
and should
return an application/javascript
file with contents similar to:
BOOMR.plugins.CT.loaded(12345); // server-generated timestamp
Beacon Parameters
This plugin adds the following parameters to the beacon:
cch.ce
: Time when the cached item started to loadcch.lt
: Load time of cached item (ms)cch.se
: Server timestamp
Methods
-
init(config)
-
Initializes the plugin.
Parameters:
Name Type Description config
object Configuration
Properties
Name Type Description CT.cached_url
string URL to load
Returns:
BOOMR.plugins.CT
The CT plugin for chaining