GithubHelp home page GithubHelp logo

Can't set expiry about vue-cookies HOT 2 CLOSED

cmp-cc avatar cmp-cc commented on May 29, 2024
Can't set expiry

from vue-cookies.

Comments (2)

cmp-cc avatar cmp-cc commented on May 29, 2024

Thank you very much for driving me

expiry testing is valid.

window.$cookies.set("TestNumber","5s Later,expiry",5);

var timer = setInterval(function(){
   if(VueCookies.isKey("TestNumber")){
     console.log(VueCookies.get("TestNumber"))
   } else {
    console.log("cookie name: TestNumber not find\t", VueCookies.get("TestNumber"))
    clearInterval(timer)
   }
},1 * 1000)

results

5s Later,expiry  
5s Later,expiry
5s Later,expiry
5s Later,expiry       
VM821:7 cookie name: TestNumber not find	 null

In line with expectations


this.$cookies.set('name', 'value', 1); // 1 second later, expiry

this.$cookies.set('name', 'value', 60); // 1 minute later, expiry

this.$cookies.set('name', 'value', new Date(2018, 1, 1)); // 2018 yeas, expiry

this.$cookies.set('name', 'value', "Mon, 01 Jan 2018 12:00:00 GMT"); // input a string

from vue-cookies.

cmp-cc avatar cmp-cc commented on May 29, 2024

my argument named, to mislead you. I'm sorry

from vue-cookies.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.