mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
## About The Pull Request this converts the dependency on byondstorage, which is laggy (due to being a large json file written to disk every 10 seconds), to using indexeddb, like we did prior to 516. this is achieved by using an iframe to give us a persistent origin, as the web is evil and has invented same-origin policy https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy. this also hosts the iframe page on the github pages site for a secondary repository (see tgstation/byond-client-storage) so it works OOTB without requiring server operators to setup the webroot cdn (which i don't believe is configured on the tg servers at the moment) however, if a server is using the webroot cdn, it will use that instead of github pages you could also host the iframe.html page on a separate host from your cdn or github pages if you wanted to if we can't access the configured cdn at all, it failovers to use byondstorage anyway, if the internet stops working and you still want your chat history to save, i guess ## Why It's Good For The Game saving this enormous json file is laggy, and this solution would fix https://github.com/tgstation/tgstation/issues/89988 and fix https://github.com/tgstation/tgstation/issues/92035 i am open to other solutions, but this does seem to require the least amount of external dependencies of posed solutions ## Changelog 🆑 fix: you should experience less stutters every 10 seconds server: server operators can now configure an alternative storage domain for clientside data storage, read the example configuration for more /🆑 --------- Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>