When the browser is on an unstable connection (or reconnecting after system resume) it sometimes wants to load resources which are not available at that moment but are part of riot (e.g. emoji).
Sometimes this leads to design issues which I normally "fix" by reloading riot entirely but on slow connections that is not always the best idea.
A better idea would be to use the caching mechanics of service workers. It can be as simple as this example.
Later it probably can be extended by some push mechanism.
I would extend that example by avatars (so URLs with <server>/_matrix/media/v1/thumbnail/<server>/<hash>) with some fallback if fetching fails.
This would especially allow Riot to be usable even if network connection is lost.
When the browser is on an unstable connection (or reconnecting after system resume) it sometimes wants to load resources which are not available at that moment but are part of riot (e.g. emoji).
Sometimes this leads to design issues which I normally "fix" by reloading riot entirely but on slow connections that is not always the best idea.
A better idea would be to use the caching mechanics of service workers. It can be as simple as this example. Later it probably can be extended by some push mechanism.
I would extend that example by avatars (so URLs with
<server>/_matrix/media/v1/thumbnail/<server>/<hash>
) with some fallback if fetching fails.This would especially allow Riot to be usable even if network connection is lost.