Here's the relevant code:
var expires = "";
var date = new Date();
expires = "; expires="+date.toGMTString();
expires = "";
document.cookie = name+"="+value+expires+"; path=/";
Full code: http://kisildalur.is/web/scripts/cart.js
You can see it live if you go to http://kisildalur.is/?p=1&id=7 click on "Kaupa" (Icelandic for Buy) on any item. You will see a nice simple animation once you do. Once an item has been added, a cookie is created but in my Opera 10.53 the cookie does not exist. Browsing any other pages will result in the cart being empty.
What am I doing wrong? :S Works for every other major browser except Opera.
I could have sworn I had tested it too but it turns out you were right, I had to run it though escape() in order for it to work on Opera.
Thanks for all the help This issue has been solved.
Do you get an error message in the error console?
One thing that has tripped me up when dealing with cookies has been when the value contains non-ASCII characters. Maybe you can try to use
Sounds like you have set Opera to not allow cookies.
Go to Tools/Preferences/Advanced and check what options you have set for Cookies.