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

  • SEARCH
  • Home
  • 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 6252175
In Process

The Archive Base Latest Questions

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

I have an issue with a site i run that when cookies are disabled

  • 0

I have an issue with a site i run that when cookies are disabled completely user cannot continue through a booking process.

I use Jquery and the cookie plugin, the cookie appears to always return [object Object] when cookies are disabled.
Code for checking this is:

alert($.cookie("sourceID")); //returns [object Object]
if($.cookie("sourceID") === null || $.cookie("sourceID")=== '[object Object]'){
sourceID = 27201;
}else{
sourceID = $.cookie("sourceID");
}
alert(sourceID);  //returns [object Object]

the above is trying to set a default sourceID if the user does not have cookies enabled. This is then passed (along with other information) into another function that builds XML and passes it to a server for handling; however due to the [object Object] issue when this is passed the server cannot find a sourceid that matches.

  • 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-24T13:45:01+00:00Added an answer on May 24, 2026 at 1:45 pm

    i found a work around for this issue, as i was trying to retrieve an integer value from the cookie it was possible to check to see if the value of the cookie returned was numeric. To do this i use the answer from this question: Validate decimal numbers in JavaScript – IsNumeric() and used:

    if(isNumeric($.cookie("sourceID"))){
    sourceid = $.cookie("sourceID");
    }else{
    sourceid = 27201;
    }
    

    not the best way to check that the cookie is returning a valid value but i would suggest anyone that hits this issue in the future to validate against what they know the cookie should contain (int, specific string etc)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cannot get code that is working in jsFiddle to run on my site.
Due to an issue that came up with a website I have to use
I have a issue designing am asp.net site. The problem is that I want
I have an MVC site, secured using [Authorize] attributes, but have an issue on
I have a bit of an issue with a site I maintain. I have
I have a jQueryMobile site/app where performance is an issue. I am reading a
I have a local site (IIS6, although similar issue with a totally different site
I have implemented jquery on the site (click on the plus sign) http://pligg.marsgibson.info Issue
Here is my issue. I have an ASPX web site and I have code
I am having an issue with a site in that it seems like my

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.