Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help with CF refresh from server - I'm new to cf

0 views
Skip to first unread message

bobby32765

unread,
Oct 9, 2004, 12:09:31 PM10/9/04
to
This shouldn't be so hard... I didn't plan to get into CF but I have no choice
because of shared hosting. Anyway...

I was using a Javascript cookie to determine if a web site (all pages) should
present one way or a different way. It worked fine, but writing
"document.write(----)" all over AND having my HTML code exposed in the
browser's view-code window isn't the best thing. I was using CFINCLUDE to
include common files anyway, and that works fine, so why not do the JS stuff in
CF instead? So I thought.

I quickly realized when the cookie wasn't changing in my CF code that it's
because the browser was using the cached CFM file and I had to force it to
refresh. Why the browser (IE6) doesn't know to refresh non-HTML files
unconditionally is beyond me but I found HTTP header meta-tags and CFHEADER
commands to correct this.

They work if I test my cookies with CF in the actual .cfm file being loaded,
but if I test the cookies in a (.cfm) file that's referenced by CFINCLUDE from
the file being reloaded, it doesn't evaluate the cookie in the included page.
Any clue as to why this is? Is there some "intelligence" built into the
CFINCLUDE refresh logic based on date/time? This is really obtuse and shouldn't
be wasting so much time. I don't have any sample code ready to present yet.

Thanks

Snake_Hollywood

unread,
Oct 10, 2004, 11:35:29 AM10/10/04
to
the coldfusion server may be caching the pages and not your browser.
Check with your host that have caching turned off.

NateNielsen

unread,
Oct 11, 2004, 9:13:13 AM10/11/04
to
little description of how the including process works in cf - a <cfinclude>
statement basically takes the contents of a file (the template="" arg) and then
inserts it into the processing page. Imagine the server copying and pasting
all of the includes for the page, then processing the entire thing after
pasting all the includes. Thats how includes work in CF.

I highly doubt you are running into a problem with <cfinclude> files being
cached. I've worked with CF for years and years and have never once seen this
happen. but, there is always a first time for everything.

can you tell us what version you are running and perhaps some sample code
showing the issue? I think we might be getting a symptom of a completely
different issue regarding the cookies, they can be tricky. :)

thanks

Nate Nielsen
http://www.webclarity.com
Check out my new zip & unzip component (free & open source!)

0 new messages