-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
FR: allow doc level opt-out of amp-auto-lightbox #26452
Comments
The |
@photocoder |
I have the same question. Why should it load if I don't intend to use. It's 3.4kb on wire. |
It just one more request what I didn't ask. |
I'd like to understand the practical concerns coming from loading a script that is a)
One important distinction between the core runtime binary ( Including Otherwise, to introduce some block for the loading of the This might need some design work in order to work properly from the core runtime's pov. I'm also not fully convinced of the need to increase core size in order to prevent this request in general. |
For me it's not necessarily about the real-world perf implications, it's that loading the script just seems a bit unnecessary, wasteful and surprising. I certainly didn't expect it to be loaded even if the page contains no images (I actually thought this was a bug); in this case I don't think an opt out should be necessary, it should just not load at all. |
+1 to @ithinkihaveacat I agree that it doesn't make sense from a perf point of view, but it is very surprising for developers and this question will come again and again. |
We get support forum topics about this for the WordPress plugin as well. |
ping @nainar |
What's the issue?
My website use AMP. And home page doesn't have any "lightbox" pluggins added.
even more, I put "data-amp-auto-lightbox-disable" tag everywhere I can, but, I still see in information, that it's loaded.
"amp-auto-lightbox-0.1.js"
You can see full stat with Waterfall Chart of request-by-request visualization of the page load here: https://gtmetrix.com/reports/dimasfrolov.com/bR3vy8mq
How do we reproduce the issue?
https://dimasfrolov.com/
What browsers are affected?
Chrome, Opera, Firefox
Which AMP version is affected?
Powered by AMP ⚡ HTML – Version 2001071857360
The text was updated successfully, but these errors were encountered: