Does your Marketo forms take too long to load on webpage?
Always load the Marketo form on the DOM-ready, as the standard form embed does, rather than injecting it after the DOM load event.
To give some background, the ready event occurs after the HTML document has been loaded, while the onload event occurs later when all content (e.g., images, JS files, and other resources) has also been loaded.
There's absolutely no need to wait for all the resources to get loaded before injecting the Marketo form.
Clearly, a visitor would have to wait an extra couple of seconds (or more, especially when they're loading the webpage for the first time) in case the form is injected after the DOM load rather than at the DOM-ready event.