jQuery Cookie plug in behavior is setting domain to com if cookie is session cookie

0 votes

Folks,

I've found that the jQuery cookie plugin is setting the domain to ".com" if the cookie I'm setting is a session cookie.

Here's the code:

jQuery.cookie("currentTab", selectedTab );

If I look at cookies with IE's Developer Tool, it shows the domain as ".com".

If I set this way:

jQuery.cookie("currentTab", selectedTab, { expires: 1} );

... then it has "www.sitename.com" as the domain.

Is there some trick I'm missing, or have I found a bug?

Thanks.

Aug 24, 2022 in Web Development by gaurav
• 23,260 points
650 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Web Development

0 votes
0 answers

How to show message in model body if bootstrap model have no data in jquery

I'm trying to display a text message ...READ MORE

Jul 29, 2022 in Web Development by gaurav
• 23,260 points
765 views
0 votes
1 answer

Check if checkbox is checked with jQuery

To check whether a Checkbox has been ...READ MORE

answered Jun 23, 2022 in Web Development by rajatha
• 7,680 points
1,404 views
0 votes
1 answer

how to use substr() function in jquery?

To get substring of a string in ...READ MORE

answered Jun 27, 2022 in Web Development by rajatha
• 7,680 points
1,277 views
0 votes
1 answer

How to loop through array in jQuery?

Generic loop: var i; for (i = 0; i ...READ MORE

answered Jun 28, 2022 in Web Development by rajatha
• 7,680 points
2,250 views
0 votes
1 answer

How to display current element in jQuery?

<! DOCTYPE html> <html> <head> <script> $(document). ready(function(){ $("button"). click(function(){ $("p"). text("Welcome to ...READ MORE

answered Jun 27, 2022 in Web Development by rajatha
• 7,680 points
1,383 views
0 votes
0 answers

Using jquery-store-locator-plugin (v2) with Multiple Forms

I'm trying to get version 2 of ...READ MORE

Aug 8, 2022 in Web Development by gaurav
• 23,260 points
434 views
0 votes
0 answers
0 votes
1 answer

How to use jquery with asp.net ajax?

If you weren't aware, Microsoft is planning ...READ MORE

answered Oct 15, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
762 views
0 votes
1 answer

Is 'sparkline' a method?

I suggest you to check 2 things That jquery.sparkline.js is actually ...READ MORE

answered Nov 9, 2018 in Apache Spark by Frankie
• 9,830 points
1,301 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP