Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6180815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:54:44+00:00 2026-05-24T00:54:44+00:00

var curCookie = name + = + value + ; expires= + ATS_getExpire() +

  • 0
  var curCookie = name + "=" + value +
    "; expires=" + ATS_getExpire()  +
    "; path=" + path  +
    "; domain=" + domain  ;     
document.cookie = curCookie;
alert("Your Cookie : " + document.cookie);

When i use above code the alert message coming as empty. Why document.cookie is coming as empty.
Please anybody answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:54:45+00:00Added an answer on May 24, 2026 at 12:54 am

    See here for a Live Example

    You’re using ; instead of ,.

    Use , to deliminate your cookie values

    var curCookie = name + "=" + value + 
        ", expires=" + ATS_getExpire() + 
        ", path=" + path + 
        ", domain=" + domain;
    
    document.cookie = curCookie;
    alert("Your Cookie : " + document.cookie);
    

    UPDATE

    As of today (2021-08-25), the live example is not consistent accross browsers:

    • Chrome 92.0.4515.159: ❌
    • Edge 92.0.902.78: ❌
    • Opera 77.0.4054.277: ❌
    • Firefox 91.0.2: ✅
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

var input; // method 1 input = document.getElementById('address').value; alert(input) // method 2 eval('input =
var thumbs = document.getElementsByTagName(img); for (var i=0; i<thumbs.length; i++) { Core.addEventListener(thumbs[i], click, function() {alert(i);});
var $imagefile = $('<input />') .attr({ type: 'file', name: 'imageFile', id: 'imageFile' }); Above
var coords = {'x' : 982, 'y' : 1002 }; The above code is
var theNewWindow = window.open('http://www.example.com', 'example', ''); How can I use the document object of
var i : integer; i := 1234567; Given the above, I want the string
var query1 = urlencode($('input[name=searchTerm1]').val()); //user1 var query2 = urlencode($('input[name=searchTerm2]').val()); //user1 var rpp = 20;
var query1 = urlencode($('input[name=searchTerm]').val()); //user1 $.getJSON('http://twitter.com/friends/ids.json?screen_name='+ query1 +'&jsoncallback=?', function(data){ $('content').append(''+data.length+''); }); This is a
var q = from child in doc.Descendants(level) where (int)child.Attribute(id) == 55 select (string)child.Element(Points).**Value.ToString()**; I
var gaJsHost = ((https: == document.location.protocol) ? https://ssl. : http://www.); document.write(unescape(%3Cscript src=' + gaJsHost

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.