Best way to embed a Godot HTML5 export on a website without performance issues?

Hi everyone,

I work on website design and development at Linkup Web, and we’re exploring adding small Godot web exports (like interactive demos or mini games) to client websites.

A few things I’d like to understand from people who’ve done this:

  • What’s the best way to embed a Godot HTML5 export in an existing site (iframe or direct embed)?
  • How do you handle loading time, since export files can be quite large?
  • Any issues with mobile browsers or SharedArrayBuffer / hosting headers?
  • Does anyone use a custom loading screen to keep visitors from leaving while it loads?

Would really appreciate any tips or examples from your experience. Thanks!

You can check the documentation page about exporting for the web that will answer most of those questions:

But, to be more specific:

Check the documentation page about optimizing the build size:

to lower the size of the executable with your needs. You can also follow this blogpost:

where they show what worked for them and how much they saved step by step.

You can fully customize the HMTL5 shell and how and when the engine starts loading so that’s up to you:

For small embeds we have had better luck with an iframe that only starts loading the .wasm after a click (or after the rest of the page is idle). Compatibility plus the no-threads web template keeps hosting simpler with no SharedArrayBuffer headers, though you trade away some parallel work. A custom shell with a short progress bar helped more than a huge preload when visitors judged the first interactive frame. Have you tried delaying engine boot until the iframe is actually in view?