1. 程式人生 > 實用技巧 >lighthouse使用_使用Chrome的Lighthouse Auditor優化ASP.NET Core網站

lighthouse使用_使用Chrome的Lighthouse Auditor優化ASP.NET Core網站

lighthouse使用

lighthouse使用

I'm continuing to update my podcast site. I've upgraded it from ASP.NET "Web Pages" (10 year old code written in WebMatrix) to ASP.NET Core 2.1 developed with VS Code. Here's some recent posts:

我正在繼續更新我的播客網站。 我已將其從ASP.NET“網頁”(用WebMatrix編寫的10年程式碼)升級到使用VS Code開發的ASP.NET Core 2.1。 這是一些最近的帖子:

I was talking with Ire Aderinokun today for an upcoming podcast episode and she mentioned I should use

Lighthouse (It's built into Chrome, can be run as an extension, or run from the command line) to optimize my podcast site. I, frankly, had not looked at that part of Chrome in a long time and was shocked and how powerful it was!

我今天與Ire Aderinokun進行了一次播客播客交談,她提到我應該使用Lighthouse (它內建在Chrome中,可以作為擴充套件執行,也可以從命令列執行)來優化我的播客站點。 坦白說,我很久沒有看過Chrome的那部分了,我感到震驚,它是如此強大!

Performance 73, PWA 55, Accessbiolity 68, Best Practices 81, SEO 78

Lighthouse also told me that I was using an old version of jQuery (I know that) that had known security issues (I didn't know that!)

Lighthouse還告訴我,我使用的是已知安全問題(我不知道!)的舊版jQuery(我知道)。

It told me about Accessibility issues as well, pointing out that some of my links were not discernable to a screen reader.

它也告訴我有關可訪問性的問題,並指出螢幕閱讀器無法識別我的某些連結。

Some of these issues were/are easily fixed in minutes. I think I spent about 20 minutes fixing up some links, compressing a few images, and generally "tidying up" in ways that I knew wouldn't/shouldn't break my site. Those few minutes took my Accessibility and Best Practices score up measurably, but I clearly have some work to do around Performance. I never even considered my Podcast Site as a potential Progressive Web App (PWA) but now that I have a new podcast host and a nice embedded player, that may be a possibility for the future!

這些問題中的一些很容易在幾分鐘之內解決。 我想我花了大約20分鐘來修復一些連結,壓縮一些影象,然後以我知道不會/不會破壞我的網站的方式進行“整理”。 幾分鐘的時間使我的“可訪問性和最佳實踐”得分得到了明顯的提高,但是我顯然有一些工作要做。 我什至從未將自己的Podcast網站視為潛在的漸進式Web應用程式(PWA),但是現在我有了一個新的Podcast主機和一個不錯的嵌入式播放器,這可能會成為未來的可能性!

Performance 73, PWA 55, Accessbiolity 85, Best Practices 88, SEO 78

My largest issue is with my (aging) CSS. I'd like to convert the site to use FlexBox or a CSS Grid as well as fixed up my Time to First Meaningful Paint.

我最大的問題是我的(老化的)CSS。 我想將網站轉換為使用FlexBox或CSS網格,以及將我的時間固定為First Meanfulful Paint

I went and updated my Archives page a while back with Lazy Image loading, but it was using jQuery and some older (4+ year old) techniques. I'll revisit those with modern techniques AND apply them to the grid of 16 shows on the site's home page as well.

我去了一段時間,並用惰性影象載入更新了我的“存檔”頁面,但是它使用的是jQuery和一些較舊的(4歲以上)技術。 我將重新介紹那些採用現代技術的網站,並將它們也應用到網站主頁上的16個節目的網格中。

There are opportunities to speed up my application using offscreen images

I have only just begun but I'll report back as I speed things up!

我才剛剛開始,但是我會在我加快速度時向我彙報!

What tools do YOU use to audit your websites?

您使用什麼工具稽核您的網站?



Sponsor: Get the latest JetBrains Rider for debugging third-party .NET code, Smart Step Into, more debugger improvements, C# Interactive, new project wizard, and formatting code in columns.

贊助商:獲取最新的JetBrains Rider,用於除錯第三方.NET程式碼,Smart Step Into,更多偵錯程式改進,C#Interactive,新專案嚮導以及列中的格式程式碼。

關於斯科特 (About Scott)

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

斯科特·漢塞爾曼(Scott Hanselman)是前教授,前金融首席架構師,現在是演講者,顧問,父親,糖尿病患者和Microsoft員工。 他是一位失敗的單口相聲漫畫家,一個玉米種植者和一本書的作者。

facebook twitter subscribe About 關於 Newsletter 時事通訊 Hosting By 主持人 Hosted in an Azure App Service

翻譯自: https://www.hanselman.com/blog/optimizing-an-aspnet-core-site-with-chromes-lighthouse-auditor

lighthouse使用