With some hosts, it can bring some problems. With plesk for example, I get this error :
Refused to execute script from 'https://www.mywebsite.com/combine/055643b60f539d6fb30ace263faf2198-1670839598' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
It can probably be fixed on the server side (didn’t find solution yet so I disabled minification), but it would be even better in my opinion to keep the file extension. Even minified and combined, it’s still .js after all.
What do you think about it ? Is there a good reason to not keep the file extension on combined files ?
It can probably be fixed on the server side (didn’t find solution yet so I disabled minification), but it would be even better in my opinion to keep the file extension. Even minified and combined, it’s still .js after all.
Just put .js or .css after combined tag in Twig, it will fetch the same resource as without it.
I was looking for this as the original combiner asset url did not include a suffix like .css or .js and Lighthouse is complaining about those resources not having an efficient caching policy.
The above strategy works as long as the following snippet (with the caching policy) is not present in my additional nginx configuration:
But if I remove this, Lighthouse is complaining that I did not provide an efficient caching policy or all the other resources like jpgs, pngs, woff2, svg…