I am working on an exercise in javascript where you have can choose between four different css-files. So far so good.

My problem is that I need to create a cookie that remember which css-file you choose if you have been at this site before. I have tried to solve this with document.cookie = "filename.css". This works perfect at my computer, if I put it out to my server it doesn't work at all. Could someone please help me?