I believe I will have to use javascript to get this done and so i place it here on stack overflow. So, I've two styles for my website, the only real difference is that certain is really a solid colour (background), another a repeated image, and so i did not make separate css files on their behalf. I've two links within the navigation bar that change it out (with javascript). Within the css file it is the solid colour, then when ever the page loads it begins out as that. Once the image theme link is clicked on, it sets the document.body.backgroundImage towards the image, so when the solid colour theme link is pressed it simply sets the backdrop image to "" (empty), to ensure that you can observe the color again. So how do i result in the theme persistent, not altering if ever the consumer would go to another page, in addition to once they return another time. Thanks.

EDIT: I'm able to use either PHP or javascript.

If you are using all javascript and haven't any serverside code to utilize, here is a JS example to create and browse a cookie:

Add this function for your JS, then run it once the theme is transformed:

function set_theme(title)title+''

  //so, run set_theme('whatevername') when it's set through the user

To see the cookie and hang the theme on-page load (using jQuery or similar $(document).ready() could be much better than onload, though, but here is a straight js/dom example)

 window.onload=function()removed title*/


Use a session to keep an eye on anyone's preferences around the serverside. Once the user returns on and it has a style selected (which you'll determine in the session variables) then your server will deliver HTML which has backgroundImage set rather than a good color. Once the user toggles preferences you are able to send an ajax request that updates the session variables.