ampproject / ampproject/amp-toolbox
Lighthouse plugin feedback
- Dominant language
- HTML
- Stars
- 459
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
Hi @alabiaga and team 👋
I've some feedback on the Lighthouse plugin that was authored last week. I wasn't sure where else to share it but if there's a better way to communicate please let me know.
At the moment the plugin uses `fetch` to retrieve the HTML of the requested page. The problem with this approach is that in many cases Lighthouse users have prequalified logins, are setting extra http headers, cookies or other general setup items that ensure that the correct environment is being tested.
In order for this plugin to be used by a wide audience, it'll need to retrieve the HTML body of the main page from Lighthouse itself. As far as I'm aware, there isn't a Gatherer to do this but I'm sure that the [`html-without-javascript`](https://github.com/GoogleChrome/lighthouse/blob/e5cfb373c04f2c0eb8458a280deac90d5f5f08ee/lighthouse-core/gather/gatherers/html-without-javascript.js) gatherer could be used as a starting point.
As far as I know custom gatherers are not able to be implemented by a plugin. This would need to be added to lighthouse-core directly (seems like a good addition to me!). Maybe someone from @GoogleChrome/lighthouse-hackers can weigh in on that?
Contributor guide
Research direction
Start by reviewing the Lighthouse plugin feedback and the referenced lighthouse-core/gather/gatherers/html-without-javascript.js gatherer. Determine how the plugin could obtain the main page HTML with Lighthouse's existing authentication, headers, cookies, and setup, and whether Lighthouse must support custom gatherers; done means the plugin no longer relies on a separate fetch request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100