You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your memberlite.js and navigation.js files, which are loaded on the front end, you have just a few dozen lines of code. Both of these scripts rely on jQuery. Is it really necessary in this case? It looks like this can all be rewritten in vanilla JS and CSS with minimal effort. Then, there'd be no need to load an additional 95kb file just to run your little bit of JS. It could potentially shave off some loading time for some of your users. Definitely something to think about.
You're also erroneously setting jquery as a dependency for skip-link-focus-fix.js in functions.php on line 23 (it doesn't rely on it):
Is jQuery necessary?
In your
memberlite.js
andnavigation.js
files, which are loaded on the front end, you have just a few dozen lines of code. Both of these scripts rely on jQuery. Is it really necessary in this case? It looks like this can all be rewritten in vanilla JS and CSS with minimal effort. Then, there'd be no need to load an additional 95kb file just to run your little bit of JS. It could potentially shave off some loading time for some of your users. Definitely something to think about.You're also erroneously setting
jquery
as a dependency forskip-link-focus-fix.js
infunctions.php
on line 23 (it doesn't rely on it):For the admin and customizer JS, this is a non-issue since jQuery is definitely going to be loaded there anyway.
Combining files:
I'd also consider combining
memberlite.js
,navigations.js
, andskip-link-focus-fix.js
for the production release.The text was updated successfully, but these errors were encountered: