0

I want to add some value with domain name in cookies using JQuery (1.6.1)and jquery.cookie.js plug-in. I am able to add Value in cookies with below code.

  $.cookie('cookie_name', 'cookie_value', { expires : 10 });

But I am not able to add the data in cookies with below code.Even unable to add cookie name or value to browser.

Code

$.cookie('cookie_name', 'cookie_value', { expires: 10, domain: 'example.com', secure: true })

Please help me out on this.

Srikanth Chilukuri
  • 563
  • 4
  • 17
  • 31

1 Answers1

0

Please refer the following links:

https://github.com/carhartl/jquery-cookie

How do I set/unset cookie with jQuery?

It may helps you.

Community
  • 1
  • 1
Ajai
  • 99
  • 4
  • I have checked it, First Link did not talk about domain. Second one is not working form me. I am not accessing the page as web application. I am opening this page as file in browser Like "file:///D:/Documents%20and%20Settings/srikanth.chilukuri/Desktop/jquery/index.html" – Srikanth Chilukuri Jun 22 '12 at 12:16