Skip to content
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

support request blocking in devtools #6838

Closed
cheneytsai opened this issue Dec 18, 2018 · 10 comments
Closed

support request blocking in devtools #6838

cheneytsai opened this issue Dec 18, 2018 · 10 comments

Comments

@cheneytsai
Copy link

Feature request summary

WPT and CDT all have abilities to block specific resources in order to determine impact of inclusion/removal on page performance. It'd be useful to be able to define what resources to block for a given set of LH runs to then compare potential impact of a resource on your resulting LH metrics.

Maybe =)

What is the motivation or use case for changing this?
Devs often wonder what's the impact of a certain set of changes. This will help them validate opportunities to pursue.

How is this beneficial to Lighthouse?
It improves the ability of LH to provide continued insight to performance enhancements with a tighter feedback cycle (vs. creating a build that LH can be run against)

@jumpalottahigh
Copy link

Second this. It could be nice if there was an option in Lighthouse to take into consideration resources blocked in the Request blocking tab. Could help greatly for quick testing potential changes.

@rjgotten
Copy link

rjgotten commented Feb 5, 2019

Would very much want this to be able to snapshot performance with/without 'tag management systems' affecting pages.

@patrickhulce
Copy link
Collaborator

Sorry I must have missed this, but this has already been a feature for a long time.

From the CLI, --blocked-url-patterns='*.png' --blocked-url-patterns='*.jpg'
From the config, it's setting settings.blockedUrlPatterns to an array of patterns ['*.png', '*.jpg']

@connorjclark
Copy link
Collaborator

connorjclark commented Feb 5, 2019

@patrickhulce I just confirmed that the network request blocking (via devtools) is not honored by Lighthouse.

image

I blocked the green-ish profile picture but it still shows in LH.

@patrickhulce
Copy link
Collaborator

Oh, sorry I should have been more specific. Yes, any settings from devtools are not honored inside Lighthouse even if the original issue supporting it "as a configuration option" is done.

I'd consider the DevTools honoring piece to be a duplicate of #3753 which captures complexity of letting devtools settings flow into Lighthouse context.

@connorjclark
Copy link
Collaborator

Gotcha. Sounds like we should be able to easily pass the block requests data via settings.blockedUrlPatterns. Was Paul's comment about it being "a large effort" before core supported blocking urls, or am I missing something?

@patrickhulce
Copy link
Collaborator

That's true we could manually grab the blocked URL patterns and just repeat those.

The larger effort part is referring to the other way of solving this (and the only way to solve the network overrides piece) which is reusing the same connection in DevTools so all settings are respected instead of creating our own connection.

@paulirish paulirish changed the title Add resource-blocking as a configuration option. support request blocking in devtools Feb 12, 2019
@paulirish paulirish added the P2 label Feb 12, 2019
@paulirish
Copy link
Member

related: #5423 local overrides support

@brendankenny
Copy link
Member

deduping into #5423 as the remaining part of this is DevTools specific and of the related issues, #5423 has the lowest priority and most labels :)

@brendankenny
Copy link
Member

lowest priority

and by lowest, I mean highest priority, lowest number :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants