Apparently a lot of people complain that they only see random letters and characters:
My biggest problem is that I can’t reproduce the problem on ANY of my devices!
Not on my Windows XP laptop, not on my Windows 7 laptop, not on my Android phone or my iPod Touch. It doesn’t matter which browser I’m using.
The only time I see the problem myself is when I try to share one of my blog posts on Google+, because the blog description then appears in strange characters.
So, first of all I need to find a way to reproduce the problem somehow.
Otherwise I won’t be able to see if what I did fixed the problem or not.
I did everything that @toscho recommended, but nothing helped.
Did anybody ever run into a similar problem or would you know where I could start to look for the problem?
Edit: I contacted my webhost. They couldn’t reproduce the problem, just like me.
They said that they have enabled gzip compression on their servers. They suggested turning off one plugin after another to see what happens, but as I can’t reproduce the problem, I can’t do that. Please help!
More and more readers are complaining about this problem. Most of them just need to refresh the page or wait a few minutes and then the site loads normally, but I’m still using a lot of traffic because of that.
EDIT 2: The W3 Total Cache Plugin FAQ says:
I see garbage characters instead of the normal web site, what’s going on here?
If a theme or it’s files use the call php_flush() or function flush() that will interfere with the plugins normal operation; making the plugin send cached files before essential operations have finished. The flush() call is no longer necessary and should be removed.
I am pretty sure that none of my code has this call anywhere, but I’m not 100% sure.
Is there any way to find out other than searching through millions of characters in all of my files?
Let’s start with the output we got before the fix:
What happened here? My guess: a collision between the plugin W3 Total Cache and your web server LiteSpeed. I found a thread in a Drupal forum about a very similar (or the same) issue.
LiteSpeed seems not to send the appropriate HTTP headers for the compressed cache files W3TC stores. In its changelog for version 0.9.2.4 W3TC says:
So the issue seems to be known, and an upgrade should fix it.
If the upgrade did not help …
Or add …
… to your .htaccess to see if it helps.
To test the results, do not rely on browser output. All browsers use different workarounds for broken compression, you cannot work with that. Use a tool like GIDZipTest to see if everything is okay.
This happened to me because I had two plugins trying to GZip compress the output. Disabling the second plugin fixed the problem.
Always specify the encoding used for an HTML or XML page. If you don’t, characters in your content may be incorrectly interpreted. Look inside your header file to specify English and UTF-8 settings. Here’s whats in my header: