library jquery load asynchronously

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
mixextra
 
 
Posts: 99
Joined: Sat Mar 21, 2020 11:45 pm

library jquery load asynchronously

Post by mixextra »

Hello Pablo greetings,

is it possible to add a WWB setting so that the jquery libraries are loaded in a normal way when the JS is set asynchronously?

I will give an example:
checked in Tools/Options/HTML/JavaScript/Load built-in JavaScript files asynchronously

published HTML:
<script src="jquery-3.6.0.min.js" async></script>
<script src="jquery-ui.min.js" async></script>
<script src="jquery.ui.datepicker-sk.js" async></script>
<script src="owl.carousel.min.js" async></script>
<script src="example1.min.js" async></script>
<script src="example2.min.js" async></script>
<script src="example3.min.js" async></script>
<script src="example4.min.js" async></script>

the smaller js files are loaded and run first, but they don't work without the library that is loaded later.

required HTML:
<script src="jquery-3.6.0.min.js"></script>
<script src="jquery-ui.min.js"></script>
<script src="jquery.ui.datepicker-sk.js" async></script>
<script src="owl.carousel.min.js" async></script>
<script src="example1.min.js" async></script>
<script src="example2.min.js" async></script>
<script src="example3.min.js" async></script>
<script src="example4.min.js" async></script>

libraries are loaded before other js files and everything works while taking advantage of asynchronous loading of other js files

well thank you

note: an alternative to async is defer, which loads and executes the js in the order specified in the HTML code. async executes the js immediately after loading, regardless of the order of the js files in the HTML code
User avatar
Pablo
 
Posts: 21713
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: library jquery load asynchronously

Post by Pablo »

I' m sorry, there is currently no option for this.
wb_user
 
 
Posts: 1099
Joined: Sun Jul 05, 2015 7:03 am

Re: library jquery load asynchronously

Post by wb_user »

mixextra wrote: Fri Oct 14, 2022 2:33 pm Hello Pablo greetings,

is it possible to add a WWB setting so that the jquery libraries are loaded in a normal way when the JS is set asynchronously?

I will give an example:
checked in Tools/Options/HTML/JavaScript/Load built-in JavaScript files asynchronously

published HTML:
<script src="jquery-3.6.0.min.js" async></script>
<script src="jquery-ui.min.js" async></script>
<script src="jquery.ui.datepicker-sk.js" async></script>
<script src="owl.carousel.min.js" async></script>
<script src="example1.min.js" async></script>
<script src="example2.min.js" async></script>
<script src="example3.min.js" async></script>
<script src="example4.min.js" async></script>

the smaller js files are loaded and run first, but they don't work without the library that is loaded later.

required HTML:
<script src="jquery-3.6.0.min.js"></script>
<script src="jquery-ui.min.js"></script>
<script src="jquery.ui.datepicker-sk.js" async></script>
<script src="owl.carousel.min.js" async></script>
<script src="example1.min.js" async></script>
<script src="example2.min.js" async></script>
<script src="example3.min.js" async></script>
<script src="example4.min.js" async></script>

libraries are loaded before other js files and everything works while taking advantage of asynchronous loading of other js files

well thank you

note: an alternative to async is defer, which loads and executes the js in the order specified in the HTML code. async executes the js immediately after loading, regardless of the order of the js files in the HTML code
using "async" method not good idea for JavaScript websites. maybe "defer" is better than "async" for you. for this reason i ask you to support https://www.wysiwygwebbuilder.com/forum ... hp?t=94756 topic for add this option in wb to the future!
Post Reply