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

220
Views
Can't set document.cookie on domain mapped to IP in hosts file

I have a dev server that I map to a domain name using the /etc/hosts file for testing purposes.

I set a cookie using document.cookie. This works when the site is sitting on the production server but it fails when I have the domain overridden in my hosts file. I log the cookie value before and after executing the script using console.log(document.cookie) and it shows that the cookie doesn't get set. The dev server is NOT local.

I am not sure that this is the cause of my problems but I'm hoping for suggestions. What are my options to make it work on the dev server?

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!