Performance options for CSS and JS: don't require selecting pages
-
I really like the initiative you’re taking with the new performance option that aims to avoid loading CSS and JS on pages where they’re not needed. I think it’s be possible to automate that, not requiring the user to specify the pages on which they’re disabled or enabled. When the automation works properly, it can be set to be on by default.
The aim would be to enqueue the scripts only if the page calls for those features of Events Manager that would use those CSS or JS files. For example on the creation of a EM_Event(s) or EM_Location(s) object there’d be a call for a function that:
- checks which CSS and JS files will be needed,
- whether they’re already enqueued,
- and if not, enqueues them.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Performance options for CSS and JS: don't require selecting pages’ is closed to new replies.