Have a voice in guiding the future of Google's developer brands. Share your thoughts in our survey.

Class: BroadcastUpdatePlugin

Constructor

BroadcastUpdatePlugin

new BroadcastUpdatePlugin(options)

Construct a BroadcastCacheUpdate instance with the passed options and calls its notifyIfUpdated() method whenever the plugin's cacheDidUpdate callback is invoked.

Parameter

options

Object

Values in options have the following properties:

Parameter

headersToCheck

Optional

Array of string

A list of headers that will be used to determine whether the responses differ.

generatePayload

Optional

string

A function whose return value will be used as the payload field in any cache update messages sent to the window clients.