• Resolved donpi73

    (@donpi73)


    Can you add options (in admin dashboard) to exclude Js files that aren’t needed?

    For example, if I choose no to show fullscreen button, I could exclude

    /lightbox-photoswipe/assets/ps5/fullscreen/photoswipe-fullscreen.esm.min.js

    and if I choose not to use dynamic captions, I could exclude

    /lightbox-photoswipe/assets/ps5/dynamic-caption/photoswipe-dynamic-caption-plugin.esm.min.js

    So we can save some Kilobites and some Server Requests…

Viewing 1 replies (of 1 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    These scripts can not be excluded since they are loaded as modules. Also see the code here. The only script which is queued at all is the frontend script (lightbox-photoswipe/assets/ps5/frontend.min.js).

    And before you ask for it: no, I will no created different versions of the frontend script which will be used depending on what options are selected in the backend – this would make the whole thing very hard to maintain just to save about 8 KB of code, sorry.

Viewing 1 replies (of 1 total)
  • The topic ‘Exclude not needed javascripts’ is closed to new replies.