I am wanting to enable the cookie consent banner. I enabled the setting in the privacy section of Site Settings. However when the website loads I am not getting the banner. When checking in the Developer console I am getting the following error;
"Refused to apply style from ... because its MIME type ('text/javascript') is not a supported stylesheet MIME type, and strict MIME checking is enabled."
Is anyone able to provide some assistance with this issue?
Hi!
What DNN version you're currently on?
Do you've any errors in the admin logs from the Persona bar?
Can you share an screenshot of the privacy page configuration from your website?
Thanks.
We have seen this a few times lately (Apr/May 2026) on recent versions of DNN. We never found the cause, but simply restarting the application (or in IIS restarting the app pool) fixed this. If that does not fix it and the problem persists, can you tell us more about the site? Have you double checked your MIME Types? We maintain a verified/accurate list of the valid MIME types that are common in (our) DNN work.
So DNN is on version 10.02.01.
Restarting the appliation pool didn't fix it.
Looked at the MIME type settings. So in the Plesk console under IIS Settings in the MIME type box it shows application/javascript .js, from the website link you gave me it looks like it is supposed to be text/javascript .js, don't know if I should change this or not, not sure what affect it would have.
However when I look in the webconfig file under the section for StaticContent there is a line for remove fileExtension js then the line after it says mimemap fileExtension = js with mimeType of text/javascript
Not sure if this helps?
I have a new update now. I updated staging site to the latest version of DNN and the banner started working on the staging site right away. Looks like that was all I needed.
Thanks everyone.
Thanks for sharing your solution!
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.