325 questions
1 vote
0 answers
60 views
Angular guard issue
I’m building an Angular app where I store the authentication token in a cookie using ngx-cookie-service. Everything works fine except when I refresh the page. After a full page reload, my authGuard ...
0 votes
1 answer
600 views
SHOPIFY: JS Cookie Set in the Product page but not retrieve on cart page
Actually, I want to store the latest product URL in the cookie, so If the user clicks on the CONTINUE SHOPPING button on the cart page, it redirects to the last access product page. If the cookie has ...
3 votes
1 answer
7k views
Type error: Property 'get' does not exist on type 'typeof import("js-cookie")' [closed]
I'm unable to build the following JS react code: import Cookies from 'js-cookie'; React.useEffect(() => { interface UserInfo { name: string; verified: boolean; } const userInfo = ...
0 votes
0 answers
344 views
Type error: Property 'getJSON' does not exist on type 'typeof import("js-cookie")'
I'm unable to build the following JS react code: import Cookies from 'js-cookie'; React.useEffect(() => { interface UserInfo { name: string; verified: boolean; } const userInfo = ...
0 votes
0 answers
46 views
Set a JS cookie if a specific class exists in a document
I am trying to set the JS cookie if a specific class exists in a document. The cookie script is working but it's not applying to the class match logic. Code: (function( $ ) { 'use strict'; ...
0 votes
1 answer
36 views
Is there any solution for changing from session to cookie in Jquery ajax?
I want to change code in this. change this sessionStorage to cookie in project, sessionStorage.setItem("modelcode", modelcode); sessionStorage.setItem("setuptypecode", ...
0 votes
0 answers
16 views
How to make jQuery code working after page refresh [duplicate]
I have following jQuery code which I want to stay active after page refresh or if user navigate to some other pages of the website: $('.darkmode-button').click(function() { $('.header-wrap')....
0 votes
0 answers
73 views
Jquery-cookie plugin - how to set "expires" to less than 1 day?
I'm trying to save info about the checkboxes (if they are checked or not) in a cookie (jquery-cookie plugin). The problem is that the plugin doesn't allow anything less than 1 day to set in the "...
1 vote
1 answer
190 views
Does a jQuery cookie delete itself when it expires?
I'm using jQuery Cookie and was wondering what happens when a cookie expires. Does it delete itself or do I have to delete it myself? I'm setting my cookie like so if ($.cookie('myCookie') == ...
2 votes
0 answers
3k views
Chat widget tawk.to blocked by chrome
I am using a chat widget from "tawk.to". It is giving a javascript way to append the chat widget in the html page. The javascript way is <script type="text/javascript"> ...
0 votes
1 answer
373 views
How to get cookie value in Js file in magento 1?
I am trying to get cookie value but "Mage.cookies" is not working in js file, How to get cookie value in js file in magento 1 ?
0 votes
0 answers
71 views
How to set and get cookie for multiple radiobutton Laravel Javascript
I am having trouble saving the quiz answer to the recurring radiobutton cookie. How do I save the value of my radio button that has been clicked into Cookies? This is my blade for the radio button <...
0 votes
0 answers
114 views
Jquery cookie plugin remove item from multiple items
I work with jQuery cookie plugin v 2.2.1 and set multiple value to name like this: html: <a href="#" id="<?= esc($product->id);?>" class="hvr-bounce-in wishlist&...
0 votes
0 answers
123 views
Cannot remove twitter cookie using jQuery
Working on some cookie removal issues. There are some cookies coming from Twitter and I cannot seem to get them to delete. In my code, I am adding in the correct path and domain to the remove code. ...
0 votes
0 answers
305 views
Remove a function after it's been triggered once
Forgive me, my jQuery/javascript knowledge is still in learning mode. I have an exit-intent modal that pops up on my page. I'm using the jQuery cookie plugin to make sure that it doesn't come up ...