Jump to content

Archived

This topic is now archived and is closed to further replies.

Phrozin

cookies, caching, and themes

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.