SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    May 2005
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    j-query-cookie plug-in

    Hello

    I've used the j-query-cookie plug-in on my site home page to manage the display of a message in a modal window.

    I have set the cookie to expire after 365 days - seems to work on FF, Opera and Chrome - (in that it doesn't appear if I close and reopen the browser) but not IE9. (The modal window appears every time I close and reopen the browser.)

    I wonder if anybody has any ideas why this might be the case.
    Many Thanks

    I have as follows

    Code:
    jQuery(function ($) {
     if ($.cookie('modal') != 'shown') 
    
    {
    
     // SET THE COOKIE FOR 365 DAYS
     $.cookie('modal', 'shown', { expires: 365 });
     
    
     // Load dialog on page load
     $('#basic-modal-content').modal();
    
     // end cookie if
     }
    
    });

  2. #2
    SitePoint Enthusiast Anthony.Barnes's Avatar
    Join Date
    Aug 2011
    Location
    Canberra, Australia
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you checked your browser settings for IE? It might be that your configuration of it isn't allowing it to store cookies or they are being deleted when you close the browser. Check your internet options and make sure 'delete browsing history on exit' isn't ticked.

    I don't know the specifics, but I'm pretty sure IE 9 was released with tighter privacy controls, some of which might be enabled by default:
    How to manage cookies in Internet Explorer 9

    That being said, I haven't had any issues with cookies on a vanilla installation of IE 9.

  3. #3
    SitePoint Zealot
    Join Date
    May 2005
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Anthony.Barnes View Post
    Check your internet options and make sure 'delete browsing history on exit' isn't ticked.
    Ahh! Thats it!

    Thanks Anthony. I had overlooked that. Great help.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •