Personally, I wouldn't worry about it, but my site doesn't really get the millions of hits that other sites do.
Another alternative is to create individual CSS files with their individual colors defined in them. Set a cookie to hold the choice of color. Then, use the CFHTMLHEAD tag to add the chosen CSS link to the document. This is not without its problems, but they may be rare. M!ke -----Original Message----- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 22, 2005 11:07 PM To: CF-Community Subject: Re: CF Generated CSS and Caching. CSS issues seems to get a better response on Community then Talk. And this is more about how browsers work and how they cache CSS content then how ColdFusion works. Actually, I'm wondering if it will cache as the desired behavior. This came from a CSS list where the question of a CSS preprocessor came up. Several of us said this is unnecessary, because if one just had to have the CSS preprocessed, there are other technologies that could do it. Of course PHP was mentioned as "THE" choice to do this complete with example. I just had to stand up and say, hey I can do this too in just a few lines. A response to the PHP reply indicated that it would ruin the benefit of CSS caching. That since the page was dynamic, it would not be cached by the browser and re-downloaded with each request for a new page. That made me wonder if the CF solution would suffer this problem as well. But since I know very little about how CSS caching works in modern browser I had no idea, and very little idea of how to test it. So I posted the question here, hoping others, more knowledgeable then I, would chime in with the answer, or at least possible ways to experiment on it. When I did a quick proof of concept. I had no problem with either IE or Firefox. If I changed the value of the color variable, the background of the page changed when I refreshed the page. So to reiterate the question, is the because the CSS is now downloaded with every request and not cached creating a potential serious performance hit, or not? Ian S. Isaac Dealey wrote: >I would expect that if you really wanted the CSS to be dynamic, that >for browsers like FireFox (which doesn't _seem_ to allow me to control >caching of css templates) you would need to include a random url >variable in your link tag to make the browser think it's a different >sheet on each request, i.e. <link >href="css.cfm?random=#randrange(1,1000)#" ...> > >though... shouldn't this have been to cf-talk? > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:5:148092 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
