Closed
Milestone
expired on Dec 1, 2023
MIME-type deduction
When retrieving content using certain transports (for example IPFS
), MIME-type information is not
available. Currently, plugins that face this issue naïvely try to guess the MIME-type based on file
extension. What is needed is a facility to reliably establish MIME-types of requested content,
made available by the ServiceWorker itself to all plugins that need it.
Plan
- implement MIME-type deduction directly in the ServiceWorker code;
- research if it would be possible to achieve this by looking at actual content, using some MIME-sniffing JS library
- define an internal API for plugins to use when they need it;
- update plugins which currently use the naïve approach to use the new internal API;
- document all of this properly.