Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would html text sometimes appear garbled when viewing on Chrome or Safari on Windows?

Occasionally users report that the text on https://squareup.com looks like gibberish (or garbled) to them… however we’ve been unable to reproduce this.

Users report to be using either Chrome or Safari on Windows, so this may be an issue with webkit.

Here are a three screenshots that have been taken of this occurring on https://squareup.com:

example 1

example 2

example 3

The pricing page on our current site:

example 4

like image 339
Beau Smith Avatar asked Sep 07 '11 00:09

Beau Smith


People also ask

Why does my HTML code show up as text?

It is possible that the content is not html type. I made a similar mistake and was wondering why it is showing as text. Check the content of the file, most probably it is not HTML or some html tags must be missing. Make sure that Doc type is explicitly mentioned as HTML type at the begining of the document.

Why CSS is not working with HTML in Chrome?

Try a different network. If your internet connection fails to load all of the resources on a website, CSS may not work in Chrome or any other browser. So, you can try to use a VPN or a different network to check if everything is OK or not.


2 Answers

Easily recreated by using an older version of Windows as well as an older branch of Chrome. Seems like Chrome 4-8 have this issue. For testing purposes, boot into XP with Chrome 4. The problem lies in text-rendering: optimizelegibility. This is a reported bug in older Chrome versions when using optimizelegibility with @font-face when using woff fonts. If you can reproduce the issue, try taking out vertical-align: baseline and see if the rendering is still garbled.

like image 81
zethus Avatar answered Nov 12 '22 05:11

zethus


It may be something related to the character encoding. Try explicitly specifying the encoding by putting this in the <head> of the page:

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
like image 43
someone Avatar answered Nov 12 '22 06:11

someone