I am designing a messaging system as a part of web application I am developing, which is intended to run on browsers.
The chat system is based on
socket.io and is working fine. It has a sidebar which loads users whom we’ve chatted with and a screen in remaining space to load the messages for selected user in sidebar.
Anytime a user is selected from sidebar, an API request is made to server to fetch the messages. However, I am feeling that if the sidebar users are being switched too often, and if the messages has been fetched already for that user, it will be making way too many API calls unnecessarily, unless any new messages are in DB (which are already on my screen since I am currently logged in).
I am thinking of a
Cache using browser’s localstorage, where I can store the messages locally and append each new message received. Only making request to server initially for each user, appending response into cache (assuming response has the message history) and then use the cache to load on each screen.
Will this design be benefitial? What if I end up hitting localstoage limit? Should I still use the API for fetching chat even when previous messages has been fetched?
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!