Open
Description
Crom responds really quickly, but the interwiki takes a few seconds to actually appear. The main delay is caused by the loading time of Wikidot's resize script. With a default starting height of 0, which is used to cause the interwiki to be hidden until data and styling has arrived, the interwiki is not initially visible. This was supposed to avoid a bottleneck, but has become a bottleneck itself.
Two possible solutions for this:
- Somehow force the browser to cache the resize script, and use that cache whenever possible.
- Start at a non-zero height and only use the resize script to become smaller.
- The contents of the iframe will need to be inititally hidden in this case, because currently the contents are considered implicitly hidden by assuming the starting height is 0. Setting the starting height to non-zero without any additional changes will cause the iframe to display with janky styling for a sec.
- This could be achieved by initially giving the interwiki contents
visibility: hidden;
, which would preserve height, and debouncing removal of that style.
Someone in #javascript recommends Service Workers as a way of manipulating underlying cache fundamentals: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
This seems promising: https://developer.mozilla.org/en-US/docs/Web/API/Cache/match