Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a few reports of people seeing raw html in their browser (instead of their browser interpreting it). It seems to be happen on slow connections. When this happens, if the user reloads the page, the page is interpreted correctly. Are there any server specific things that would cause this to happen? We're using Php 5.1.6 and Apache 2.2.3.

share|improve this question

1 Answer 1

Two possible scenarios immediately come to mind:

  1. By "raw html", if you mean "interpreted, but unstyled", then this most often happens with pages that are designed strictly with CSS to do all of the styling, because the stylesheet only gets downloaded after the html has been loaded. What you may want to try is to embed some very basic styling inline in the html head section which would at least mean that the page would look "acceptable" until the remaining stylesheet code has been downloaded. And if the stylesheet never actually makes it to the client in the first load, even after waiting patiently, then you may want to increase your connection timeout, which may be preventing the download of the all of the files to display the page correctly.

  2. By "raw html", you really mean "uninterpreted, unstyled plain text with !DOCTYPE and html tags visible", then it could be an even more chronic case of what I described above, or that your PHP script may be set to flushing the response buffer to the client before the html has been completely generated (however, even in this case, most browsers will still make a reasonable attempt to interpret the HTML).

I'll sleep on it and if any more ideas come to mind before anyone else comes up with something more concrete, I'll update my answer accordingly

share|improve this answer
I've seen the issue with CSS often enough, especially on overloaded servers. It takes so long to load the HTML and the images that the browser gives up waiting and you're left with a horribly un-formatted page. – Mark Henderson Aug 21 '09 at 0:28
Reloading the page fixes this issue because the browser has (or at least, should have) cached a lot of the information, leaving the new request to download the missing files (the CSS) – Mark Henderson Aug 21 '09 at 0:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.