Sha256: 397b20dd4ac933b3a8d6bf246637b549f18dd637182d0b100630452e847c06ac
Contents?: true
Size: 715 Bytes
Versions: 7
Compression:
Stored size: 715 Bytes
Contents
(function () { /* global LUX, performance */ if (typeof LUX === 'undefined') { return } const navigationPerformance = performance.getEntriesByType('navigation')[0] if (!navigationPerformance) { return } // As per RFC 147[1], this adds in monitoring of the type of HTTP protocol that // is used when a browser loads a page. // [1]: https://github.com/alphagov/govuk-rfcs/pull/148 LUX.addData('http-protocol', navigationPerformance.nextHopProtocol) const serverTiming = navigationPerformance.serverTiming if (serverTiming) { const cacheState = serverTiming.find(entry => ['cacheHit', 'cacheMiss'].includes(entry.name)) if (cacheState) { LUX.addData('cache', cacheState.name) } } }())
Version data entries
7 entries across 7 versions & 1 rubygems