lit / lit/lit.dev

Cache-headers and/or Service Worker

Open
#182 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
142
Forks
230
PR merge metrics
No merged PRs in 30d

Description

We send Cache-control: max-age=0, so we have no caching even for the exact same asset within a single page load (e.g. playground-typescript-worker.js). We do have ETags, so it's not a full response each time, but the server still needs to read and compress the asset to check the ETag. We'll need a better caching strategy (maybe default 5 minute window, hashed asset names with longer windows, and/or service worker).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting repeated requests for playground-typescript-worker.js and the current Cache-Control and ETag behavior. Define and document a caching strategy for unchanged assets, then verify that repeated page-load requests avoid unnecessary asset reads and compression.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
performance, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.