The "No Dev Question is Stupid" Thread - Basic HTML / CSS / Etc.

Ryuzaki

女性以上のお金
Staff member
BuSo Pro
Digital Strategist
Joined
Sep 3, 2014
Messages
3,761
Likes
7,146
Degree
8
@JasonSc, I think defer only defers the execution of the script but not the downloading of it.

I'd try async instead and see if that helps. At least this way the rest of your resources can keep downloading.

Otherwise there's more advanced deferring methods you can use that require more code though.

If this is a script you're inserting into the HTML yourself, you can try to manually defer it by moving it to the footer and "truly" defer it.
 
Joined
Mar 25, 2019
Messages
30
Likes
39
Degree
0
We migrated to Jotforms (not my choice) and these forms are stupid large and are slowing things down. 300KB and 6 server calls for a simple contact form.

As much as I want to use something else I can't, again not my choice. I would like the form to delay loading until after the dom is complete.

This is the code jotform provides:
Code:
<script type="text/javascript" src="https://form.jotform.com/jsform/1111111111"></script>
I tried this and it doesn't work:
Code:
<script defer src="text/javascript" src="https://form.jotform.com/jsform/1111111111"></script>
This is for Wordpress sites and the form is on every page of the site.
Put the line at the bottom of the page. It'll load after the body is loaded.