Do SSE queries overload the browser?

Asked

Viewed 29 times

1

I am working on a real time web project, which seeks information from the server through SSE. That is, the first request is made to the server, after that the server will send a JSON every second or a half second to the browser.

Thinking about an extreme situation (and that is possible in this project) where the browser will be open for a few months, running without being turned off, my question is : does the sent JSON overload the browser in any way? Is there any scenario that justified the refresh of the browser every X seconds because of some kind of overload?

  • You must disable the cache in your request.

  • so if the cache is not disabled, that data will be stored somewhere? And if I refresh the page every x seconds would solve this problem without having to programmatically disable the cache?

  • You can choose what to do. you can disable the request cache.

  • refresh may not be the solution, or may be, will depend on what you need to implement.

  • the HTTP specification allows the server to return a number of different Cache Control directives that control how and for how long each response can be cached by the browser and other intermediate caches.

  • I understand. So in the example scenario where it would be possible to push about 2764800 JSON per day the only fear would be the cache?

  • you are speaking in kb?

  • There is no size limitation inherent in the general JSON request itself. Any limitation would be set by the server when analyzing the JSON request

  • No, I’m talking about quantities. There will be 2764800 Jsons shipped per day. Each JSON is about 400kb. My initial question would be whether there is any limitation to the system. For example, the browser being open without refresh for 30 days would be 82944000 Jsons per month. Would there be some overload problem somewhere? Cache or client’s memory or CPU?

  • Solved your doubt?

  • I solved the problem. I re-load every 10min. But the question remains.

Show 6 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.