Jump to content

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
Link to comment
https://forums.phpfreaks.com/topic/15812-cookies-caching-and-themes/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.