Hacker News new | ask | show | jobs
by speps 959 days ago
A lot of people have forgotten that cookies aren't just for session id and can store anything. The browser also sends them all in the initial GET request. So yes you're right, it could have been done server-side for the 2nd visit.

Also, because of cookie banners, they got a bad reputation even though most countries allow you to store non personal data. Even just data that is necessary for the functionality of the website doesn't need permission.

1 comments

That requires a dynamic backend, though. A lot of people use static site generators for their blogs these days. Otherwise you're absolutely right and this is a perfect use for a cookie.