Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Audit: Avoid file versioning for certain file types #9607

Closed
Malvoz opened this issue Aug 24, 2019 · 4 comments
Closed

New Audit: Avoid file versioning for certain file types #9607

Malvoz opened this issue Aug 24, 2019 · 4 comments

Comments

@Malvoz
Copy link
Contributor

Malvoz commented Aug 24, 2019

Developers should avoid versioning the URLs (as otherwise commonly used for cache-busting) of both service workers and web app manifest files as described in:

/cc @jeffposnick

@jeffposnick
Copy link
Contributor

It's a good thing to avoid, but it seems super-hard to detect, though? If someone does decide to, e.g., add a hash into a service worker file, how many characters will that hash have? What will separate the hash from the file name? All of that is up to the developer and is hard to generalize.

@Malvoz
Copy link
Contributor Author

Malvoz commented Sep 3, 2019

You're right, but there are some conventions that could be looked for. I think the convention usually looks something like: <filename>(./-)<hash>.<extension>, but also using query strings:
<filename>.<extension>?=<hash>.

Plus developers are free to name the files anything they want, too. I think service workers are mostly named sw.js, or service(-/_)worker.js. While manifests (web)manifest.json and *.webmanifest.

It may be that it isn't worth the effort of implementing such an audit, considering all the ways to version a file. I also don't have any data that suggests that this is even all that common of a mistake to support this audit request.

@Malvoz
Copy link
Contributor Author

Malvoz commented Oct 2, 2019

FWIW, the Sec-Fetch-Dest HTTP header exposes both the manifest and serviceworker request destinations.

@Malvoz
Copy link
Contributor Author

Malvoz commented Dec 11, 2019

This is a duplicate issue of #2570, closing.

@Malvoz Malvoz closed this as completed Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants