Giter VIP home page Giter VIP logo

Comments (7)

carhartl avatar carhartl commented on May 17, 2024

In my tests this is working fine. Maybe your path is mismatching? To delete a cookie that was created with a certain path you need to specify the very same path.

Otherwise, could you please provide a test case?

from jquery-cookie.

chandutekworks avatar chandutekworks commented on May 17, 2024

hi guyz clearing cookie is not working ....plz help
i am using this code

var date=new Date(2000,12,10);
$.cookie("username", null, { expires: date });

from jquery-cookie.

carhartl avatar carhartl commented on May 17, 2024

You don't need to pass a date.

$.cookie('username', null);

With the latest version you would use:

$.removeCookie('username');

Caveats: Make sure to pass the same path and domain options the cookie was written with when trying to delete it. Also, you can't delete the cookie from another page if you had written it without the path options - by default the page is where the cookie was written.

from jquery-cookie.

chandutekworks avatar chandutekworks commented on May 17, 2024

thanq man its working fine ....thank u for your support

from jquery-cookie.

chandutekworks avatar chandutekworks commented on May 17, 2024

i have another issue.....
i used
$('#somelement').load('menu.html');

menu.html :

hi this is chandu

this line for including 'menu.html' file in my another html file...in which way i have add data dynamically to one element which is present in 'menu.html' in present html file..
i used
$(''#heading').html('goog bye');

this but its not working...
please help me

from jquery-cookie.

BrainCrumbz avatar BrainCrumbz commented on May 17, 2024

Please everyone (us included ;) ), when deleting a cookie DO remember to pass in the same path & domain options used upon creation.
Otherwise, as soon as you start poking with cookies from different pages/subfolders, you'll start experiencing un-killable cookies everywhere ... They're coming outta the goddamn walls! :-P

from jquery-cookie.

carhartl avatar carhartl commented on May 17, 2024

As mentioned in the README. Also, default options may make lifes easier here.

from jquery-cookie.

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.