SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2008
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jquery.cookie randomly failing

    I am using the jquery.cookie plugin (https://github.com/carhartl/jquery-cookie) on a project and it seems to work pretty good, except that sometimes it doesn't bother to actually set a cookie value. After extensive testing there seems to be no real rhyme or reason to when it will decide to just not work. Has anyone else had this problem? More importantly has anyone found a solution?

  2. #2
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MauiMan2 View Post
    sometimes it doesn't bother to actually set a cookie value.
    Would you care to show the code that brings you to that conclusion?
    Tab-indentation is a crime against humanity.

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2008
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the project isn't live yet but it's not actually "code" that shows the problem, it's the "Cookies" tab in Firebug that shows the values for cookies that have been set. And sometimes on this project you click on something that normally sets a cookie but no value actually shows up.

  4. #4
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MauiMan2 View Post
    Well, the project isn't live yet but it's not actually "code" that shows the problem, it's the "Cookies" tab in Firebug that shows the values for cookies that have been set. And sometimes on this project you click on something that normally sets a cookie but no value actually shows up.
    Maybe it just doesn't always update. When testing cookies, to be certain of what's happening you can run the following code in the address bar:

    Code:
    javascript:alert("Cookies%20visible%20on%20current%20domain%20and%20path:\n\n"+document.cookie.split(/\;\s*/).join('\n\n'))
    For convenience it should be saved as bookmark.
    Tab-indentation is a crime against humanity.


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
  •