ianc
How to disable websockets in browser for testing?
I want to disable websockets in my browser (e.g Chrome, Firefox, etc) to experience the JS fallback (longPoll) in my LiveView application.
You think it would be simple to turn off websockets somewhere, but it’s not!
Note that I don’t want to “hack” the fallback in app.js by altering longpollFallbackMs or similar approaches. I want to experience the fallback as a user would if their network connection blocks websockets.
Thanks for any suggestions and hopefully I’ve just overlooked something.
First Post!
ErikNaslund
Would it work for you if you blocked requests to a specific URL or URL pattern?
If that’s the case, then you can simply right click a URL in the “Network” tab of the Chrome dev tools and select “Block request URL”.
You can also add URLs and URL patterns manually on the “Network request blocking” tab.
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









