Curious if this is a known issue / quirk of proxy servers, but any site I run through hugo pipes for minification and fingerprinting will not properly load the CSS on [most] proxy servers. I uncovered this recently trying to troubleshoot what ended up being a strange local cache issue, but I was wondering if anyone had any insight into why this would be? Is it the additional extension added to the filename possibly? The CSS loads fine with no minification / fingerprinting run on all proxy servers.
Secondly, is this something I should even worry about? It seems to load fine on any other device and browser.
Iām interested in learning more about how those interact with Hugo, if anyone has experience.
Say, could you share more into about the setups you use? Which kinds of proxies? I ask because this didnāt occur to me, and Iām wondering if some projects arenāt rendering correctly and I missed it.
Thanks for the questions! Iām not sure what could be wrong with the minification, it loads fine on every device iāve personally tested and many of these sites have been live and functioning for some time now until I came across this issue. It happens when I minify and fingerprint CSS or SASS files run through hugo pipes like this:
Iāve narrowed down the issue to the Fingerprinting / Integrity. The majority of these proxy providers seem to not like something about that. Iām not well-enough versed to answer why, but removing the integrity fixed it across the board - Minification still in use.
Suffice to say Iād still like to know if anyone knows more about the extent of this āissueā (I struggle to even call it that because I tested on ever āmodernā browser back to IE8 and wasnāt able to reproduce this issue outside of the proxy servers. But I also dont know if this would theoretically affect people using a VPN also then?
I was also able to confirm the integrity / fingerprinting can prevent the file from being properly loaded when using netlify branch subdomains. So itās so to be something with the additional hashing on the file names.
Tried the same code with and without integrity on the production branch (deployed to the root domain) and on a netlify brand subdomain (which uses the $deploy-prime-url) to add the staging link.
Works fine on production, but on staging the link isnāt loading- the hashes are the same, so thatās not the issue.
Iām not sure if these are related to the proxy failing to load, but I feel like it might be.
I canāt help, I donāt use half the things you are proposing creates an issue. Hereās some observations, though:
āProxyā is a concept, not a standard. It makes sense some proxies will fail to load a fingerprinted resource; some might say that is by design.
If you are having an issue with a Netlify sub-domain, you ought to contact them; theyād want to know if fingerprinting wasnāt working correctly.
Without your code repo, no one can reproduce this error (or no one else has noticed); I suggest you make it easy for another helper to reproduce your error.
This is a problem at CloudFlare Pages also. They are investigatingāvery cooperatively.
For very long filenames of css CloudFlare Pages is incorrectly setting the mime type of the css files. They may set application/octet-stream or text/html. The correct type is text/css. Because the css file has the wrong mime type, most browsers will refuse to link the css to the site. Essentially the entire site will render poorly. There are layouts from theme, but all of the references to styles are broken.
I canāt say this is the problem you experienced at netlify, but it sounds similar.