question about Load built-in JavaScript files asynchronously

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
wb_user
 
 
Posts: 1062
Joined: Sun Jul 05, 2015 7:03 am

question about Load built-in JavaScript files asynchronously

Post by wb_user »

I enable Load built-in JavaScript files asynchronously in wb option
this option is very, very usable, but it has a problem with themeable menu. because themeable menu uses Jquery, and this option adds async for that.
<script src="js/jquery-3.6.0.min.js" async></script>
this is problematic because on the mobile, themeable menu does not open if you try to open the hamburger menu!
to resolve problem, i add <script src="js/jquery-3.6.0.min.js" ></script> in page heading and problem are resolve.
I think about this: can I remove async from wb created code? Or can I make an exception async for jquery-3.6.0? or is any better way to i not use two:
<script src="js/jquery-3.6.0.min.js" ></script>
<script src="js/jquery-3.6.0.min.js" async></script>
In my page?
User avatar
Pablo
 
Posts: 23598
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: question about Load built-in JavaScript files asynchronously

Post by Pablo »

If you make an exception for jQuery, then you will need an exception for many other scripts as well because most scripts depend on jQuery.
This process cannot be automated by WWB because there are too many possible combinations.
So, whether or not you can use async can only be determined by trial on error.
wb_user
 
 
Posts: 1062
Joined: Sun Jul 05, 2015 7:03 am

Re: question about Load built-in JavaScript files asynchronously

Post by wb_user »

Pablo wrote: Sun May 01, 2022 1:00 pm If you make an exception for jQuery, then you will need an exception for many other scripts as well because most scripts depend on jQuery.
This process cannot be automated by WWB because there are too many possible combinations.
So, whether or not you can use async can only be determined by trial on error.
i have ten js in my page like lottie player. can i set none-async for one of them manually?
User avatar
Pablo
 
Posts: 23598
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: question about Load built-in JavaScript files asynchronously

Post by Pablo »

I have ten js in my page like lottie player. can i set none-async for one of them manually?
No, you cannot set this option for individual scripts.
User avatar
wwonderfull
 
 
Posts: 1603
Joined: Fri Aug 21, 2020 8:27 am
Contact:

Re: question about Load built-in JavaScript files asynchronously

Post by wwonderfull »

Even I used the themeable menu as its the best menu I can possible think of. Had the hamburger not working issue. It is documented in help that:
Load built-in JavaScript files asynchronously
Specifies that built-in scripts will be executed asynchronously as soon as they are available.
Note that this is only useful when 'Generate external JS file for page specific scripts' is enabled, because otherwise local scripts may be executed before the external scripts they depend on have been loaded!
So to use that stylish menu without any errors those 2 options needed to be disabled.
It is the only menu wich supports image along side and is very much themeable.
wb_user
 
 
Posts: 1062
Joined: Sun Jul 05, 2015 7:03 am

Re: question about Load built-in JavaScript files asynchronously

Post by wb_user »

wwonderfull wrote: Sun May 01, 2022 2:56 pm Even I used the themeable menu as its the best menu I can possible think of. Had the hamburger not working issue. It is documented in help that:
Load built-in JavaScript files asynchronously
Specifies that built-in scripts will be executed asynchronously as soon as they are available.
Note that this is only useful when 'Generate external JS file for page specific scripts' is enabled, because otherwise local scripts may be executed before the external scripts they depend on have been loaded!
So to use that stylish menu without any errors those 2 options needed to be disabled.
It is the only menu wich supports image along side and is very much themeable.
if your mean I disable "Generate external JS file for page specific scripts'" it not possible, because I have ten js file and It is not justifiable.
one of my ideas use "notepad++" for published pages, if I cant find any better way...
User avatar
wwonderfull
 
 
Posts: 1603
Joined: Fri Aug 21, 2020 8:27 am
Contact:

Re: question about Load built-in JavaScript files asynchronously

Post by wwonderfull »

there are so many other manu out there which use less javascripts but that is not the problem I guess. It was more about the async on the script.
Post Reply