-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only load required scripts and CSS #554
Comments
Hi @fredericalpers, I checked in the code and see that we have 24 working js files, of which:
|
@dai-eastgate I will come back to you with an answer as soon as possible |
@dai-eastgate Please go ahead and implement the suggested solution. If possible please document the performance improvements before and after. |
OK, I got it. Thanks! |
@fredericalpers I need 6 days to implement and test because we have changed a lot of files. Thanks |
@fredericalpers
B. I have added asynchronous properties for 3 files: onoffice-estatetype.js, onoffice-multiselect.js and slick.js. Here are evidence videos of 8 files that I have refactored (The features will be the same as the master branch).
C. Here are some documents on the performance improvements before and after refactoring the code |
Current state
Currently all JavaScript and CSS files provided by the plugin are always loaded. This worsens the performance of websites. Also it can cause conflicts with Themes, Builders and Plugins used by external customers and their developers/designers. For our projects we use the WordPress Dequeue Function. However this is not always an option for all customers, especially external customers who are working on the website themselves or with other developers/designers.
Investigate
Investigate if and how we can provide and load the Script and CSS files only if necessary.
Desired state
The JavaScript and CSS files should only be loaded when necessary.
The text was updated successfully, but these errors were encountered: