• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFCACHE and DOCTYPE Issues

Guest
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

Views

928

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 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?


Votes

Translate

Translate
Community Expert ,
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.




Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
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?


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
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.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
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.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 30, 2023 Sep 30, 2023

Copy link to clipboard

Copied

LATEST

@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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation