2 ms·
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 ye
by speps 3y 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.
- globular-toast 3y agoThat 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.