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

Chore: add more media mimetypes #4169

Open
wants to merge 266 commits into
base: main
Choose a base branch
from

Conversation

Seirdy
Copy link

@Seirdy Seirdy commented Dec 12, 2020

Add some mimetypes for images/audio/video.

Pull request checklist

Make sure you:

Short description of the change(s)

Add some mimetypes for long-lived resources to the http-cache hint.

@Seirdy Seirdy force-pushed the feat/moar-longcache-mimes branch 2 times, most recently from 74fffbc to c0cc65a Compare December 12, 2020 09:16
@Seirdy
Copy link
Author

Seirdy commented Dec 13, 2020

Also worth noting that some of these mimetypes aren't supported in all browsers; adding a check to the compat hint to ensure that these are used in backward-compatible ways (e.g. in a <picture> element with fallbacks) might be useful.

Copy link
Contributor

@sarvaje sarvaje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sarvaje
Copy link
Contributor

sarvaje commented Dec 14, 2020

Question for @webhintio/contributors, is there any audio/image/video that shouldn't have a long cache? because one solution could be to have something like video/* image/* audio/*.

@Seirdy
Copy link
Author

Seirdy commented Dec 14, 2020 via email

@antross
Copy link
Member

antross commented Dec 17, 2020

I like the idea of not maintaining a granular list here since we don't need to vary behavior on specific audio/font/image/video types. Seems if there are any exceptions it'd be a shorter list to maintain that rather than listing everything to begin with.

@Seirdy Seirdy force-pushed the feat/moar-longcache-mimes branch 3 times, most recently from 1783e50 to fb9e5a5 Compare December 18, 2020 20:45
'audio/ogg',
'audio/mpeg',
'audio/mp4',
'audio/*',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more code is necessary to make this work?

Copy link
Author

@Seirdy Seirdy Dec 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does seem to fail one jsdom test:

  › validateResults (/home/vsts/work/1/s/packages/utils-tests-helpers/src/hint-runner.ts:159:11)
  › runHint (/home/vsts/work/1/s/packages/utils-tests-helpers/src/hint-runner.ts:418:20)

@Seirdy Seirdy force-pushed the feat/moar-longcache-mimes branch from fb9e5a5 to c0cc65a Compare December 19, 2020 01:45
@Seirdy
Copy link
Author

Seirdy commented Dec 19, 2020 via email

dependabot-preview bot and others added 10 commits February 6, 2021 16:48
Connectors oerview => Connectors overview

- - - - - - - - - - - - - - - - - - - -

Fix webhintio#4261
Close webhintio#4302
Change pathToTslib to resolve the path to tslib based on
the tsconfig.json location rather than current working directory

- - - - - - - - - - - - - - - - - - - -

Fix webhintio#4175
Close webhintio#4258
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.1.0 to 18.1.1.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](octokit/rest.js@v18.1.0...v18.1.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>
sarvaje and others added 30 commits June 8, 2021 16:45
* Fix: Webpack configuration
Bumps [acorn](https://github.com/acornjs/acorn) from 8.2.4 to 8.4.0.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](acornjs/acorn@8.2.4...8.4.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>
Making this match reality as we're generally prepared to help resolve issues in dependency updates about once a month (aside from higher-priority security issues).

Close webhintio#4658
Bumps [@octokit/core](https://github.com/octokit/core.js) from 3.2.5 to 3.5.1.
- [Release notes](https://github.com/octokit/core.js/releases)
- [Commits](octokit/core.js@v3.2.5...v3.5.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Chore: Handle Octokit type changes and removal of oauthAuthorizations

Close webhintio#4653
Add some mimetypes for images/audio/video.
JPEG-XL is currently available in Firefox, Chromium, and derivatives
(e.g. Edge) behind a pref; it will be landing soon. It should be cached
no differently from other image formats.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants