"Force" correct MIME types for .css and .js files by setting Aggregation and Compression on by default

Created on 20 June 2015, over 9 years ago
Updated 5 February 2024, 10 months ago

I put this down as an issue for 8.1, because although I think it is more than just trivial, I think we have limped along with this problem for enough time that it does not need to be dealt with immediately, and some of the other issues, such as https://www.drupal.org/node/2506369 may add wrinkles in to the mix that may actually solve the problem. What the problem is as it existed in Drupal 7 can be seen at https://www.drupal.org/node/1412832 and I think it is still a problem. I proposed a solution at https://www.drupal.org/node/1448934 , but I think it best just to turn on Aggregation and Compression of css and js files by default, if the problem persists. I am not sure of the component to blame for this, so I put it down as other. I gave it priority of Normal, even though some may see this as Minor.

My rationale for choosing this solution is primarily to deal with the problem, but not let ISPs off the hook for their failures. If out of the box, Drupal formatting is good until Aggregation and Compression is turned off, some will not bother to look further and will just leave it turned on. That is acceptable, IMHO. Most of us use Firefox and Firebug, and people using that toolset will have a possibility of seeing where the problem lies, which is not in Drupal code, per se. My concern is for our reputation and to not let ISPs completely off the hook for this.

Yes, we could try and force the correct MIME type in all cases. Some ISPs will not allow you to change the MIME types of the files themselves, and serving them up raw, without correcting the headers, leads to them being sent as Content-type: text/html. Some browsers don't care, and neophytes setting up a Drupal site with a browser that does not care about the Content-type in the header will not see the problem. They will become aware of it only after someone using a browser that does care tries to render the site.

;'{P~~~

Feature request
Status

Closed: duplicate

Version

11.0 🔥

Component
Other 

Last updated about 14 hours ago

Created by

🇺🇸United States Clearbrook

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024