I have implemented a php page cache. I compared the uncached and cached versions of the page. They are identical. But when I turn the debug message of the cache on, the layout breaks in Internet Explorer. For example, the unordered list with the menu is not displayed horizontally, but vertically. There are other bugs as well. I've traced this down to the debug message. It is a simple text that is displayed at the very top of the page, before the doctype tag. If I turn the debug message off, the site displays as intended. DEBUG HEADER : This is a cached page !<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Code (markup): Why is Internet Explorer screwing this up? And what can I do to prevent this? It might be necessary for the client to turn the debug message on. They layout must not break in this case.
Because IE is IE. Can you place the debug message somewhere else on the page, like in a hidden <div> or <!-- -->?