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
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!)