perf(page): analytics.flisk.si landing page is sent with no-store, so the 4 KB static page is never cached
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- backend, performance
Research direction
Start by running the curl -sI https://analytics.flisk.si/ command in the issue to see the cache-control: no-store header, then find the Worker's fetch handler where that blanket header is applied to every response. Branch the header by route so only the landing page gets a public max-age plus an ETag, and add tests for the landing page, the If-None-Match 304 path, and stats/API staying no-store. Done means all three acceptance checks pass and the existing test suite is still green.
Written by the indexing model from the issue text.
Description
Problem
The analytics.flisk.si landing page is a small static page (4,295 bytes compressed) but is sent with Cache-Control: no-store. Browsers and the edge can never reuse it, so every visit downloads it again and no 304 is possible.
Reproduce:
- Run
curl -sI https://analytics.flisk.si/ | grep -i cache-control. - It prints
cache-control: no-store. - Compare with host.flisk.si and fleet.flisk.si, which send
public, max-age=300.
Expected: a short public cache rule (for example 300 seconds) with an ETag for the static landing page, and no-store only on responses that carry per-user data.
Root Cause Analysis
One blanket no-store rule is applied to every response from the Worker, including the static landing page. The rule was probably meant for the stats and API responses, which are per-site and private.
TDD Fix Plan
-
RED: Write a test that the landing page response has a public cache rule and an ETag.
GREEN: Set the cache header on the landing route only. -
RED: Write a test that a conditional request with the same ETag returns 304.
GREEN: Compare the ETag and return 304. -
RED: Write a test that stats and API responses still send no-store.
GREEN: Keep the blanket rule for those routes.
REFACTOR: Move cache rules into a small per-route table.
Acceptance Criteria
- Landing page sends a public max-age rule and an ETag
- A repeat request with If-None-Match returns 304
- Stats and API responses still send no-store
- All new tests pass
- Existing tests still pass
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 1h 33m
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from flisk-sh/analytics
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
All issues in flisk-sh/analytics
Similar issues
-
chore cloudflare-workers consistency d1 difficulty: easy documentation dx enhancement good first issue help wanted hygiene javascript maintenance priority: P3 seo
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Link Checker ReportOpenautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MattiaPARRINELLO/backstage#70 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
untemps/svelte-palette#298 ·