Going cookieless with Laravel
Laravel & Cookies, I bet you have it lying somewhere.
But does it need to be like that?
Yes, I know… It is enabled, by default. But. Really. Does every website needs them?
You are heavily using cookies on your website, I mean heavy: setting some popup states, visit states, tracking, bashing, and smashing all over the place?
Or heavily rely on session storage?
Have some forms on the website?
Then you probably use it.
Benefits of going cookieless #
Performance gains #
The cookieless website has a great potential to use static caching, which leads to great performance improvements and decreased load to your origin server.
More on this topic here.
Could be more, but those two are my main drivers for ditching cookies.
Should you go cookieless? #
- Want to ditch that cookie consent for Europe (EU)?
- Want more website performance?
- Want to remove the necessary code from the website?
Then go for it.
How you can go cookieless? #
- Offload your forms.
- Implement cookieless tracking.
- Do not rely on sessions.
Those are the first steps you could take, it could be more.
It depends on your case.