-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include Lightbox js only when gallery is used on that page #2
Comments
It's think it should be oke, if you look at the networking I think it is cached when loaded. So no problem.... |
Hi. I didn't say there was a problem. I think it is unnecessary to load it on all pages. It would be better to load only on pages with galleries. thanks |
It's not loaded on all pages :) that is what i was saying ;) |
I guess you have never used this plugin. :) js and css files are loading on all pages. |
Sorry I should elaborate.... The script and css is at a minimum mem cached by the browser. So only downloaded once per cached session, and than it is only really fully executed when it finds what it's looking for, very small overhead. Looking dynamically for galleries and then lazily server side injecting the script en executing it is way more overhead! Dont forget it works on all images that are a link! |
I already use cache and the pages are loaded as html. So I don't think these plugin files need to be loaded on all pages. Example: I used to use this plugin for "NextGEN Gallery" before. https://wordpress.org/plugins/nextgen-gallery-optimizer/ this was not allowing it to load on all pages. I was looking for a method similar to this. thanks |
Hi. The plugin is nice and I want to use it. But the plugin js,css files are loading on all pages. It's not necessary.
How can I make it only load on pages with a wordpress gallery? If there is a gallery in posts, load the plugin js,css files? thanks
The text was updated successfully, but these errors were encountered: