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.
– durtto
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?
– zwitterion
You can choose what to do. you can disable the request cache.
– durtto
refresh may not be the solution, or may be, will depend on what you need to implement.
– durtto
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.
– durtto
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?
– zwitterion
you are speaking in kb?
– durtto
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
– durtto
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?
– zwitterion
Solved your doubt?
– durtto
I solved the problem. I re-load every 10min. But the question remains.
– zwitterion