Phrozin Posted July 27, 2006 Share Posted July 27, 2006 Hi all. I started learning HTML and PHP 4 days ago, and I've actually managed to make my own website (w00t!), but I have a problem I just can't figure out of find an answer to through google. I have my [url=http://www.phrozin-tt.com]site[/url] setup so that a visiter can change themes by clicking on the little squares up top/right. This action sets a cookie that keeps the themes name. I also inserted code that caches the site to speed things up. Problem is that the cache doesn't take a theme into account, this results in the webpage being displayed in whatever theme was active when the cache was created.Now I figured that if I include the cache file after the css link it would be fine (as it wouldn't cache the css link), but that means that everything above the css link would not be cached either. Everything I've been reading about caching says that the cache code has to be run before anything else is. is this true? will I be negating the effect of caching by starting after the css link? I'd post up some code, but I really don't know what code anyone would need to see, so I'll wait till you say something like "well, we need to see your code for cookies", or "we need to see the code for the themes" or whatever.My website is static, but emulates having a DB. I do have MySQL, but I don't really want to use DBs because I had a premade (cookie cutter) CMS that got hacked. Am I pretty much fubar'd without a DB?Thanks for reading and any help you can give.Joe Quote Link to comment https://forums.phpfreaks.com/topic/15812-cookies-caching-and-themes/ Share on other sites More sharing options...
spfoonnewb Posted July 27, 2006 Share Posted July 27, 2006 I went to your site and clicked around changed the theme and stuff like that I didnt notice anything different, the theme stayed to whatever I choose, even if I left the site came back and refreshed.The only way it went back to normal was if I deleted cookies. Quote Link to comment https://forums.phpfreaks.com/topic/15812-cookies-caching-and-themes/#findComment-64767 Share on other sites More sharing options...
Phrozin Posted July 27, 2006 Author Share Posted July 27, 2006 Yeah, I disabled caching on the site until I get it resolved. Quote Link to comment https://forums.phpfreaks.com/topic/15812-cookies-caching-and-themes/#findComment-64786 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.