Skip to content

Tag: cookies

Cookie values not being returned in Firefox

This works totally fine on my local dev version in all browsers… …and will return all the current cookie values on the page, like this: The problem is that it doesn’t return anything in Firefox or Edge on production. It does work in Chrome on production though. Here’s how Chrome dev to…

Why cookies are added rather than changed?

I am developing a site where each user should have their own id. When I went into the console, I saw that the id was duplicated instead of being one. Is this normal and should it be? Answer Cookies, by default, use the path of the page that they are set for. You should explicitly set the path to /

How to save data into cookie in PHP from PDO

I need some help as have been stuck here for a while, please bear with me as am a rookie and perhaps this might be simple to a seasoned developer, basically am trying to save data into a cookie so that i only hit the database once, after that, I want when i reload the page to get my data