After installing boost, my site does no longer validate as XHTML strict. It seems there are several issues with the HTML generated by boost that the W3C Validator complains about.
First of all, the block "Boost: Pages cache status" generates the following two error messages:
Attribute "content" exists, but can not be used for this element.
document type does not allow element "form" here; missing one of "object", "ins", "del", "map" start-tag
This issues are caused by the following line of XHTML: <span class="boost cache-status" content="7980"><small>Site Has Changed: <em>False</em><br />Expire In: <em>2 hours 13 min</em><br />Cache Generated: <em>0.65</em> seconds<br /> <form action="/" accept-charset="UTF-8" method="post" id="boost-block-flush-form">
Would it be possible to remove or change the "content" attribute and also to wrap the form properly?
The other issues are caused by the line <iframe src="/boost-gzip-cookie-test.html" style="width:0px; height:0px; border:0px; position:absolute; top:-1000px; z-index:10;"></iframe>
. Specifically, the W3C does not like:
Attribute "src" exists, but can not be used for this element.
Attribute "style" exists, but can not be used for this element.
element "iframe" undefined. Did you mean "iframe" or "frame"?
Instead of "iframe", I would suggest using "object".
Comment | File | Size | Author |
---|---|---|---|
#6 | boost-674664.patch | 2.68 KB | mikeytown2 |
#3 | boost-674664.1.patch | 3.29 KB | mikeytown2 |
#2 | boost-674664.patch | 5.78 KB | mikeytown2 |
Comments
Comment #1
netbjarne CreditAttribution: netbjarne commentedGot the same errors. Latest drupal, acquia slate theme, site xhtml strict validated before boost.. Sad, as boost really boosts :)
1. Error Line 123, Column 206: Attribute "src" exists, but can not be used for this element.
…rupal themes
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedIgnore this file; has 2 patches in 1
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedthis is the correct patch; using this trick
http://intranation.com/test-cases/object-vs-iframe/
http://aplus.rs/web-dev/insert-html-page-into-another-html-page/
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks very much for this really quick fix - just installed the latest version and the issues are addressed. Unfortunately though this has now created a new issue as the W3C validator now complains:
This is caused by the following line:
<object classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13" type="text/html" data="/boost-gzip-cookie-test.html" style="width:0px; height:0px; border:0px; position:absolute; top:-1000px; z-index:10;"></object>
Object, it seems, needs to be wrapped. Of the suggested options "p" and "div" seem appropriate to me - perhaps go for a div?
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedComment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedApplied the patch; works like a charm.
Again, thanks for addressing this so fast!
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted
Comment #10
j0nathan CreditAttribution: j0nathan commentedSubscribing because I think this is not yet in the stable version (actually 1.18).
Comment #11
FiNeX CreditAttribution: FiNeX commentedconfirmed comment #10
Comment #12
Andrew Udvare CreditAttribution: Andrew Udvare commentedThis is still not in stable for me. I have changed the line to put the element in a div.
Comment #13
mikeytown2 CreditAttribution: mikeytown2 commentedIt's in the latest dev. latest dev is a lot better then 1.18
Comment #14
sreyas CreditAttribution: sreyas commentedUsing the latest dev version date Jan 25th. When checks the for the first time everything is good as expected. But on repeated test HTML validation fails.
Please see the site here.
http://www.urltrim.com
Comment #15
B.P.B CreditAttribution: B.P.B commentedI had the exact same problem as #5.
The fix appears to be very simple. Output the object with a div wrapped around.
Please add this change to the 6.x release.
Comment #16
Funksmaname CreditAttribution: Funksmaname commentedthanks #15! this is still an issue that should be looked at... the change #15 mentioned is in boost.module file btw.
Comment #17
janton CreditAttribution: janton commentedthanks #15
Comment #18
pandymic CreditAttribution: pandymic commentedFurther to comments #5 and #15, I just want to report that this solution does not validate as HTML5, due to the removal of the "classid" attribute from the specification.
The fix is as simple as removing the classid attribute entirely from the existing code. This does, however, pose a problem for Internet Explorer users because commonly used versions of the browser rely on the use of "classid"
Therefore the proposed solution requires that IE Conditional comments be used. It's not pretty, but it works.
The following PHP code can be applied to the boost.module file. Similar to the original changes, it should replace the code that currently exists on line 2280.
This code replaces the code that already exists in boost.module on line 2280
Comment #19
bgm CreditAttribution: bgm commented