0
/t5/coldfusion-discussions/cfcache-and-doctype-issues/td-p/797298
Apr 12, 2006
Apr 12, 2006
Copy link to clipboard
Copied
When a page is succefully cached coldfusion returns the cached html with a comment line occupying the first line. If the doctype isn't the first thing IE finds in the document it displays the page in Quirks mode, which makes it nearly impossible to use CSS consistantly between browsers.
Does anyone have a solution/work around to this caching issue? Running MX 7 on windows 2k3.
TOPICS
Getting started
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Expert
,
Apr 13, 2006
Apr 13, 2006
Apparently, what you're seeing is a well-known Internet
Explorer bug. If anything appears before the doctype declaration,
IE6 reverts to Quirk's mode. Do you do the caching with the cfcache
tag? Couldn't you add some Javascript to hide the offending comment
line?
8
Replies
8
Community Expert
,
/t5/coldfusion-discussions/cfcache-and-doctype-issues/m-p/797299#M74020
Apr 13, 2006
Apr 13, 2006
Copy link to clipboard
Copied
A Coldfusion comment ( <!---c---> ) or an HTML comment
( <!--c--> )? I don't expect problems from either.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guest
AUTHOR
/t5/coldfusion-discussions/cfcache-and-doctype-issues/m-p/797300#M74021
Apr 13, 2006
Apr 13, 2006
Copy link to clipboard
Copied
Yes you wouldn't expect a problem from either yet there still
is one:
The page returned without caching:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
....
The page returned after successful cache:
<!--- http://servername/index.cfm--->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
...
Looks and works fine in firefox. Didn't check other browsers but i would expect the compliance based ones will work.
IE doesn't find the doctype and displays in quirks mode.
The page returned without caching:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
....
The page returned after successful cache:
<!--- http://servername/index.cfm--->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
...
Looks and works fine in firefox. Didn't check other browsers but i would expect the compliance based ones will work.
IE doesn't find the doctype and displays in quirks mode.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/coldfusion-discussions/cfcache-and-doctype-issues/m-p/797301#M74022
Apr 13, 2006
Apr 13, 2006
Copy link to clipboard
Copied
Apparently, what you're seeing is a well-known Internet
Explorer bug. If anything appears before the doctype declaration,
IE6 reverts to Quirk's mode. Do you do the caching with the cfcache
tag? Couldn't you add some Javascript to hide the offending comment
line?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/coldfusion-discussions/cfcache-and-doctype-issues/m-p/797302#M74023
Apr 23, 2006
Apr 23, 2006
Copy link to clipboard
Copied
I see from the topic's title that you likely use the cfcache
tag. Then one can assume that the tag occurs in an ordinary CFM
page, the one to be cached. Since Application.cfm or
Application.cfc runs before the page, the problem might be solved
by outputting the string
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">'
within Application.cfm or Application.cfc.
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd">'
within Application.cfm or Application.cfc.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guest
AUTHOR
/t5/coldfusion-discussions/cfcache-and-doctype-issues/m-p/797303#M74024
Apr 24, 2006
Apr 24, 2006
Copy link to clipboard
Copied
Same behavior... using application.cfc / cfm
Something i did notice. Is it either doesn't cache or doesn't put the comment when you load up the server from localhost or 127.0.0.1.
Thanks for looking into this. I did try some javescripting, but by the time you can run a script IE has already decided to process the page in quirks mode. I didn't find a way to reverse it.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/coldfusion-discussions/cfcache-and-doctype-issues/m-p/797304#M74025
Apr 25, 2006
Apr 25, 2006
Copy link to clipboard
Copied
We cannot do anything about IE6 reverting to quirksmode when
there is a comment line before the doctype declaration. That's just
an IE browser bug.
I'll continue to look. However, the only solution I see, so far, is for the Coldfusion team to update the cfcache tag to prevent it from putting the comment line there in the first place. What you can do, as developer, is to file a bug report and wait in hope.
I'll continue to look. However, the only solution I see, so far, is for the Coldfusion team to update the cfcache tag to prevent it from putting the comment line there in the first place. What you can do, as developer, is to file a bug report and wait in hope.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/coldfusion-discussions/cfcache-and-doctype-issues/m-p/14121697#M195925
Sep 29, 2023
Sep 29, 2023
Copy link to clipboard
Copied
I have the same issue and have tried Firefox and Chrome browsers with the same issue. The main issue I am seeing is we are trying to use CKEditor or TinyMCE which require the page to be in standard mode. This worked up till sometime in the last year.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/coldfusion-discussions/cfcache-and-doctype-issues/m-p/14123579#M195929
Sep 30, 2023
Sep 30, 2023
Copy link to clipboard
Copied
@Terry31459325f5az , this thread is 17 years old. That amounts to a number of generations in software terms.
In fact, ColdFusion has had 8 major-version releases since 2006. Hence, I would suggest that you start a new thread of your own.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more