{"action":"opened","issue":{"url":"https://api.github.com/repos/vector-im/riot-web/issues/7984","repository_url":"https://api.github.com/repos/vector-im/riot-web","labels_url":"https://api.github.com/repos/vector-im/riot-web/issues/7984/labels{/name}","comments_url":"https://api.github.com/repos/vector-im/riot-web/issues/7984/comments","events_url":"https://api.github.com/repos/vector-im/riot-web/issues/7984/events","html_url":"https://github.com/vector-im/riot-web/issues/7984","id":395428755,"node_id":"MDU6SXNzdWUzOTU0Mjg3NTU=","number":7984,"title":"Use service worker to cache assets","user":{"login":"krombel","id":11167142,"node_id":"MDQ6VXNlcjExMTY3MTQy","avatar_url":"https://avatars0.githubusercontent.com/u/11167142?v=4","gravatar_id":"","url":"https://api.github.com/users/krombel","html_url":"https://github.com/krombel","followers_url":"https://api.github.com/users/krombel/followers","following_url":"https://api.github.com/users/krombel/following{/other_user}","gists_url":"https://api.github.com/users/krombel/gists{/gist_id}","starred_url":"https://api.github.com/users/krombel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krombel/subscriptions","organizations_url":"https://api.github.com/users/krombel/orgs","repos_url":"https://api.github.com/users/krombel/repos","events_url":"https://api.github.com/users/krombel/events{/privacy}","received_events_url":"https://api.github.com/users/krombel/received_events","type":"User","site_admin":false},"labels":[{"id":1104388083,"node_id":"MDU6TGFiZWwxMTA0Mzg4MDgz","url":"https://api.github.com/repos/vector-im/riot-web/labels/redesign","name":"redesign","color":"cbbdfc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-01-03T00:59:26Z","updated_at":"2019-01-03T00:59:26Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Description\r\n\r\nWhen 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).\r\n\r\nSometimes this leads to design issues which I normally \"fix\" by reloading riot entirely but on slow connections that is not always the best idea.\r\n\r\nA better idea would be to use the caching mechanics of service workers. It can be as simple as [this example](https://github.com/go-gitea/gitea/pull/4730/files#diff-864f5556dc5e0416bde07f5a22aa6267).\r\nLater it probably can be extended by some push mechanism.\r\n\r\nI would extend that example by avatars (so URLs with `/_matrix/media/[...]`) with some fallback if fetching fails.\r\n\r\nThis would especially allow Riot to be usable even if network connection is lost."}}
{"actor":{"display_login":"krombel"}}