Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make a cookie with no expire lifetime

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 190
    Comment on it

    Hello Reader's If you have writing the code that makes the cookies for valid lifetime then you just need to set big number for it's validity. As the example below PHP code:-

    Maximum value: 2147483647
    
    setcookie("CookieName", "CookieValue", 2147483647);
    To avoid integer overflow the timestamp should be set to:
    
    2^31 - 1 = 2147483647 = 2038-01-19 04:14:07
    

    So now this cookie is valid for year 2038.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: