0
votes

I am investigating a certain website for page speed analysis. The page has various plugins and third-party js files being included. So, I wanted to find out which one of them is causing the google pagespeed score to dip. One way is to manually remove the third party code and then check the pagespeed score, but, i do not have access to the codebase. I cannot use any other tool such as GTMetrix for analyzing as the benchmark for us is set by using google pagespeed insights.

So, i was wondering if there is a way to block a certain URL while analyzing a page in google pagespeed insights. GTmetrix has a ignore URL option which ignores a certain URL while getting the page score. Is there a similar functionality for Google pagespeed insights?

1

1 Answers

0
votes

Although this isn't possible via the Page Speed Insights (PSI) website or PSI API you can use the audits tab in Google Chrome to achieve this (which uses lighthouse the engine that powers PSI).

Open developer tools, go to the network tab, reload the page to get all the loaded assets.

Right-click on the item you want to exclude from your test and choose 'Block Request URL' from the right click context menu.

Now go to the audits tab and run a performance test.

This way you can systematically rule out poorly behaving scripts from 3rd parties etc. without having to keep fiddling with the source of the page.

Don't forget to switch off blocking (there is a tab at the bottom of the developer tools window that will appear for this called 'Request Blocking') after you have run your tests or you may spend 45 minutes debugging a website that worked fine like I once did!!