August 13, 2022

A Simple Vue.js Plugin To Handle Browser Cookies Library

Vue cookie is a simple plugin for Vue.js to handle browser cookies.

set cookie javascript, remove cookie javascript, types of cookies in javascript, get cookie javascript, jquery cookie, javascript get cookie by name, jquery set cookie

How to make use of it:

Install & Download:

# NPM
$ npm i vue-cookies --save

Package Managers

<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue-cookies@1.7.4/vue-cookies.js"></script>
// require
var Vue = require('vue')
Vue.use(require('vue-cookies'))

// es2015 module
import Vue from 'vue'
import VueCookies from 'vue-cookies'
Vue.use(VueCookies)

// set default config
Vue.$cookies.config('7d')

// set global cookie
Vue.$cookies.set('theme','default');
Vue.$cookies.set('hover-time','1s');

Vue Handling Cookies In Vue Plugin/Github, document cookie not working


See Demo And Download

Official Website(cmp-cc): Click Here

This superior jQuery/javascript plugin is developed by cmp-cc. For extra Advanced Usages, please go to the official website.

Share

You may also like...

Leave a Reply

Your email address will not be published.