I’m trying to improve loading of resources, specifically a CSS file within my addon. Currently I inject a CSS file via
css. When the addon is applied to the target website, you can shortly see the unstyled content (FOUC), until my CSS-file has fully loaded. This can be annoying, as the elements on the target page might jump around a bit until everything is loaded.
Whether I change
document_start in the
manifest.json does not help. I have also tried to inject the CSS via a
background-script, which loads CSS into the target-tab via
browser.tabs.insertCSS. This does not seem to fully work around the FOUC problem as well.
Is there some other technique that I can try to improve loading of CSS (and maybe other resources), or is this to be expected?