Aarrgghh!!

IE, cfcache and XHTML Strict Don't Mix

I ran into a little problem today, and haven't figured out a way around it yet.

I had a page that is slow but changes rarely, a textbook case for <cfcache>. So I added the caching statement, and ran it. It looked perfectly fine in Firefox. I went to look at it in IE 7, and the CSS was screwed up (supposed to be a centered aligned design, now all the way to the left).

I couldn't figure it out. I looked at the source code, no differences. Finally I ran a comparison on the two page sources, and discovered that <cfcache>seems to add a ColdFusion style comment containing the url of the page into source, above the doctype declaration. I couldn't see how that would cause the problem, so I submitted the source to the W3 Source validation service. It informed me that the comment style invalidates the page, because I was using XHTML 1.0 Strict.

As I see it, my workaround is to set the page to XHTML 1.0 Transitional, or stop using <cfcache> on this page.


August 17, 2007 Posted by Terrence Ryan at 12:16 PM

ColdFusion, Web Development,



Comments

Wow! This is very good to know. Fortunately, it looks like a bug report has been filed: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt19.htm


Posted by: Richard Davies at August 20, 2007 2:02 PM

Aarrgghh Guy! I'm not holding my breath. ;)




Posted by: Terrence Ryan at August 21, 2007 1:52 AM

Well, in the 8.01 release of coldfusion, this bug is logged as fixed in the release notes - however we're running 8.01 servers and still see the comment in the headers.

Ahh Adobe - you know if cf was open, we'd have fixed this by now ;)


Posted by: Kevin Penny at September 19, 2008 1:43 AM

In the 8.01 release of coldfusion, this bug is logged as fixed in the release notes - however we're running 8.01 servers and still see the comment in the headers.


Posted by: tower defense at May 9, 2009 4:07 AM

I just ran into this problem as well. Spent last night racking my brain trying to figure out what was wrong with my CSS and why IE didn't like it. Never even thought of cfcache until now. Any ideas how to get around it?


Posted by: Ben Thompson at June 16, 2009 2:06 PM

Posted by Who at February 9, 2010 4:09 AM

Post a comment











Remember personal info?