Skip to content
Advertisement

The Content-Type HTTP header is missing charset attribute

During security check, its reported that “The Content-Type HTTP header is missing charset attribute” is missing for js and css file.

Please check below screenshot:

enter image description here

My HTML Was look like below before i have added the charset

JavaScript

Then i have added the charset=”UTF-8″ in

JavaScript

Still Charset is not added in Response Header, Please check below screenshot:

enter image description here

So what should i do so my Content-Type header changed to below:

content-type: application/javascript; charset=utf-8

Advertisement

Answer

Let me try to answer, you can do that by editing apache2.conf (for Debian like OS(es) ) or httpd.conf ( CentOS like OS(es) ) and add following lines:

JavaScript

Source:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement