Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

276
Views
Page have their own cookies path didn't link to the index (Javascript)

When I clicked allow the cookie at the blog page, then it have their own path. When I back to the index page it ask for cookie again.

(But if I click allow at the index page, it will link to every page.) [enter image description here][1]

This happens when I clicked allow at the index page and blog page. (It's have 2 cookies and the same name but different path) [1]: https://i.stack.imgur.com/mjlI4.png

acceptBtn = cookieBox.querySelector(".consent_buttons button");

acceptBtn.onclick = ()=>{
    document.cookie = "Geek-Cookies=GEEKGENTH; max-age"+60*60*24*30;
    if(document.cookie) { //if the above cookie had set
        cookieBox.classList.add("hide");
    }else {
        alert("Cookie can't be set!");
    }
}
let checkCookie = document.cookie.indexOf("Geek-Cookies=GEEKGENTH");
checkCookie != -1 ? cookieBox.classList.add("hide"): cookieBox.classList.remove("hide");```

Thank you,
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!