Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Reached end of document without finding <body> is an error, should be a warning or less #134

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

Generally, serve up an HTML output with no <body> tag in it

In my case: 

1. Run wordpress with wp-greetbox plugin
2. Notice the above error in the logs

What is the expected output? What do you see instead?

I didn't want to see these errors in the logs.

What version of the product are you using (please check X-Mod-Pagespeed
header)?

0.9.10.1-250

On what operating system?

CentOS

Which version of Apache?

Apache/2.2.9 (Unix)

Which MPM?

prefork

Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.

mod_pagespeed reports HTML fragments with no <body> tag as an error, when in 
fact these are not really worth the attention of the server administrator.

For example, this WordPress plugin "WP-Greetbox" appears to be fetching the 
HTML fragment using AJAX and inserting it into the page, and in this case a 
body tag would be extraneous.

There are various other AJAX use cases for non-well-formatted HTML; for 
example, if you want to get plain text back in a POST response in an iframe 
I've found I have to send it as text/html otherwise browsers might wrap it in a 
<pre> tag or other wonderful transformations.  Sending the plain text with the 
wrong content type results in an innerHTML with just the right contents.


Original issue reported on code.google.com by dobes.va...@kashoo.com on 6 Dec 2010 at 6:45

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant