The icing on the cake is that you can use puppeteer (or similar) to automate complex tasks. (you can do this in the Lighthouse tab in Developer tools so maybe not that good a reason).īecause you get the raw timings data you can also set your own criteria if you want. ![]() You can even use -disable-storage-reset to see how the site responds on a subsequent page visit where the user has already cached images etc. You can also pass headers, set cookies (slightly difficult at the moment but something they are working on) etc. This is great for making you realise how sloppy your (my!) JavaScript is! You can also set your own parameters when running tests.įor example I like to set my "cpuSlowdownMultiplier" very high (8 or 10) as I have a decent CPU and I want to catch any bottlenecks / long tasks that I may miss on slower devices. Secondly you get the full JSON response (or CSV or HTML report, your choice) so you can store some (or all) of the audit results to a database for each page and see if any pages are performing poorly or whether you are improving or ruining your page performance. Or if you want to check every page on your website you can automate that, very useful if you have hundreds of pages. ![]() You could have it run on every significant change / commit to check you haven't broken something. ![]() This gives you some significant advantages over using the "Lighthouse" tab in Developer tools. You can install the Lighthouse Command Line Interface (CLI) locally on your machine quite easily. Although this is an old question there is an alternative way to run Lighthouse (the engine behind Page Speed Insights) locally that may be useful to people in some circumstances.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |