Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Cache busting with url versioning params #179

Open
@arxpoetica

Description

@arxpoetica

So I just ran into the favicon not updating unless I manually break the cache like so:

<link rel='icon' type='image/png' href='/favicon.png?v=2'>

Without ?v=2 it wasn't picking up my changed icon. I think this is something fundamental enough it ought to be built in to the platform, some sort of cache breaking mechanism. Potentially this sort of thing:

<link rel='icon' type='image/png' href='/favicon.png?v=%sapper.version%'>

Would it be as simple as picking up package.json major version (semver) upgrades 0.x.x? I suppose it ought to be a manual break, though, because I can imagine people wanting to be able to manage cache busting (images, css, js, etc.). Still, it would be convenient to have a single env var or some file or some mechanism somewhere in one place that we could update easily and have it ripple out through the whole app.

Thoughts?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions