jQuery cookie behaves differently on local machine vs production server
        Posted  
        
            by 
                user1810414
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user1810414
        
        
        
        Published on 2012-12-04T16:33:53Z
        Indexed on 
            2012/12/04
            17:04 UTC
        
        
        Read the original article
        Hit count: 228
        
I'm setting a jQuery cookie for some site javascript effects. I'm setting expiration date to 30 days.
On local development machine cookie expiration is set properly, whereas on production expiration is being set to end of session. After inspecting the created cookies with web develoer tools, everything is identical except production machine cookie is marked as "session cookie" and setting expiration is disallowed, while cookie created on local development machine is not set to "session" and expiration date is editable.
Is there a way to make production machine cookie accept the expiration date?
This is how I set the cookie:
$.cookie('skip_animation','skip', 2592000);
Using jQuery 1.6.4 (legacy site)
All browsers behave the same way
© Stack Overflow or respective owner