Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weird fix from PageSpeed Tools

When I test my webpage in PageSpeed Tools (a tool to optimize webpages by Google), I get these problems:

Problem #1:

Avoid a character set in the meta tag

The following resources have a character set specified in a meta tag.
Specifying a character set in a meta tag disables the lookahead downloader in IE8.
To improve resource download parallelization, move the character set to the HTTP Content-Type response header.

Problem #2:

Specify a character set

Specifying a character set early for your HTML documents allows the browser to Begin executing scripts IMMEDIATELY.

Suggestions for this page

The following resources have not set the character set in HTTP headers.
If you specify a character set in there, speeds up the rendering in the browser.

But I do not see why I get these problems because I have specified Character set like this in the head:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />

The question: Can someone help me fix these problems?

like image 451
user1431627 Avatar asked Dec 15 '22 22:12

user1431627


1 Answers

It's telling you: Move the character set to the HTTP Content-Type response header. Look at this:

Wikipedia - List of HTTP header fields

Basically, the actual HTTP response that the client gets back from the server, should have the Content-Type field set. If you can't change this, then just set it in the <meta> tag as you are.

EDIT:

If you are able to, modify the .htaccess file on the server to include:

AddType 'text/html; charset=iso-8859-15' html

That will cause all the HTML files served to include the appropriate response header.

like image 150
phenomnomnominal Avatar answered Dec 19 '22 11:12

phenomnomnominal