Specific css and js for element or template

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10038493
    Someone
    Participant

    Hi,

    I would like to know if there is a documentation that lists specific css and js are required for which template, element, etc.
    I think it is important, so we don’t have to load unnecessary files.

      For example:

    • jquery.gmap.min.js is required for Google Map
    • theme-blog.css is required for blog template

    Thanks.


    #10038500
    Support
    Keymaster

    Hello,

    Thanks for your purchase. Unfortunately we don’t have a documentation to show exactly which css/js are used for each page, as you can see Porto comes with a lot of different demos and we create the demos based in the default files/components, the standard files are the ones that are used on index-classic.html – that file is the basic one. But if you want to have a smaller assets files you can just open the files css/theme-elements.css and js/theme.js – there you will see that we have all the elements and you can just remove the elements that you won’t use.

    Regarding performance, there are a few things you can do after you finish your website. For example, there are several different ways to compress and combine the assets, this is probably the easiest way: http://www.okler.net/forums/topic/minify-php-how-to-combine-minify-and-cache-javascript-and-css-files-on-demand/

    The images can also be improved, consider to export them in a lower quality. JPG 80% is good enough.

    Regarding the cache, this is the right way to do that: https://developers.google.com/speed/docs/insights/LeverageBrowserCaching

    You can also remove the plugins that you will never use in any page and combine/compress all the other scripts so it will cache the resources and make it much better in performance in any other page.

    The use of a CDN to serve your website files also it’s a good idea.

    It works the same way for all HTML templates. All files come uncompressed to make it easy to edit and customize, and then when you finish your website you can make the improvements.

    We hope this helps!

    Kind Regards,

    Jonas


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

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