egze
Cookieless / Sessionless Phoenix and LiveView
I was moving my personal site to Phoenix LiveView and noticed the there is always a session cookie present.
I’m wondering if it’s possible to run a LiveView application without cookies. There is this EU cookie law that there needs to be a warning if the site is using cookies and I would like to just have no cookies at all, to skip this cookie popup.
So the questions is:
- How to run a Phoenix site without sessions/cookies?
- How to run a LiveView enabled Phoenix site without sessions/cookies?
Most Liked
egze
And it’s fixed in master. Got the hearts from José himself. Feeling pretty good about myself ![]()
egze
Tests issue is a bug. Trying to fix it here: Phoenix.LiveViewTest doesn't seem to work without sessions · Issue #820 · phoenixframework/phoenix_live_view · GitHub
lucaong
Not a lawyer, but the EU cookie law does not disallow all cookies. It explicitly allows those “strictly necessary for the delivery of a service requested by the user”, with one such example being a cookie used to implement a shopping cart in an e-commerce application. As long as you don’t use the session cookie for other tracking purposes not necessary for the functioning of your app, you should be fine.
The session cookie is in most cases “strictly necessary”, as your app cannot really work without, if it has to maintain any state. Conversely, third party cookies and tracking pixels are not strictly necessary, and would definitely fall into the ones you should be able to opt-out from. In between, there is a large gray area.
Here’s Wikipedia on that: ePrivacy Directive - Wikipedia
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








