0

I want to combine CSS Files and JS files without plugins ; I am procedding with searching to dequeue scripts not to be in used and after that making them in one file Do anyone has an idea? Without plugin Thanks in advance

4
  • 1
    What have you researched so far? What did you already try? Can you show us your code?
    – DeltaG
    Commented Aug 5, 2022 at 13:14
  • Why wouldn't you use a plugin? Autoptimize is built exactly for that purpose. You can look at Autoptimize's source code and write your own version of the combiner. If you want someone else to do it for you, you should hire a freelancer. Commented Aug 6, 2022 at 1:09
  • @SahriarSaikat Well, I'm here after testing autoptimize. It works great, all kudos to it but there's a couple of reasons why it might not be the best solution. 1. it's incredibly bloated for the one task 2. it would be nice to use another method of caching as well as aggregating CSS (or JS) which is not really caching
    – Chris Pink
    Commented Sep 21, 2023 at 12:15
  • Thinking aloud; maybe hooking into wp_enqueue_scripts as a last action, enumerating the CSS files and writing them into a new file. There would also need to be a mechanism for defeating this action.
    – Chris Pink
    Commented Sep 21, 2023 at 12:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.