Eliminate unused javascript (Remove/Disable a Plugin or Partial)

Home Forums Porto – Responsive HTML5 Template Eliminate unused javascript (Remove/Disable a Plugin or Partial)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10045063
    Monique
    Participant

    Eliminate unused javascript

    Hi,

    I know I can eliminate (Remove/Disable a Plugin or Partial) that has an initialize function. But there are also a lot of functions in theme.init.js and also in
    theme.js which I do not want to use, do not need. How can I remove/disable functions which do not have the initialize function theme.init.js and theme.js? If I comment them out now I will have to do it again with the next update of the theme.

    Regards,
    Monique


    #10045065
    Support
    Keymaster

    Hello, theme.js is where we have all the basic functions that are used on Porto, custom plugins that we created and some of them have dependencies to others, like Carousel (OwlCarousel). You can remove those that you don’t use, but as you said you will have to do that again when you receive an update, unfortunatelly there’s not way to do that automatically. The only way would be having multiple files so you could just not included them, but it would generate much complexity for the theme. Also, that file compressed have a little more than 100kb.

    Kind Regards.


Viewing 2 posts - 1 through 2 (of 2 total)

This topic is marked as "RESOLVED" and can not rceive new replies.