GoogleChrome / GoogleChrome/lighthouse

Resources with ETag caching are reported with full size by 'uses-long-cache-ttl'

Open
#9,118 6 comments 1 reaction 0 assignees View on GitHub
P2
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 14h
Merged PRs (30d)
20

Description

#### Provide the steps to reproduce
1. Run LH on https://react-demo.docker-box.inpref.com/

#### What is the current behavior?

LH reports resource https://d2wzl9lnvjz3bh.cloudfront.net/frosmo.easy.js to have _Cache TTL=None_ and _Size (KB)=54 KB_.

#### What is the expected behavior?

The resource (https://d2wzl9lnvjz3bh.cloudfront.net/frosmo.easy.js) is cached using the ETag mechanism. For the user of the report it would better to report _Size (KB)_ of the resource as

- _0 KB_ or
- _0 KB(ETag)_

to reflect the actual bandwidth usage more accurately.

#### Environment Information
* Lighthouse version: 3.0

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the `uses-long-cache-ttl` audit on https://react-demo.docker-box.inpref.com/ and inspect how the resource's ETag caching is interpreted. The work is done when the report no longer treats the cached resource as having its full transfer size, instead showing 0 KB or an explicit ETag indicator.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.