遇到GitHub上圖片無法加載或者加載速度較慢的解決辦法

最近在登錄github網(wǎng)站的時候,發(fā)現(xiàn)很多時候圖片沒法加載或者加載速度很慢,以為是掛代理的原因,后來驗證了一下并不是。如下圖中圖片沒有正常加載:


github主頁

解決辦法:

為了提高速度,可以使用HOSTS加速對Github網(wǎng)站加載的資源網(wǎng)站域名解析。

具體做法:

修改 C:\Windows\System32\drivers\etc 中的hosts文件(PS:若沒有修改權(quán)限,可以鼠標(biāo)右鍵,屬性,安全,修改權(quán)限?;蛘邔osts文件復(fù)制到桌面,修改之后,復(fù)制到原文件夾)如下圖所示:


接著將下面一段話添加到hosts文件中:

# GitHub Start 
192.30.253.112 github.com 
192.30.253.119 gist.github.com 
151.101.100.133 assets-cdn.github.com 
151.101.100.133 raw.githubusercontent.com 
151.101.100.133 gist.githubusercontent.com 
151.101.100.133 cloud.githubusercontent.com 
151.101.100.133 camo.githubusercontent.com 
151.101.100.133 avatars0.githubusercontent.com 
151.101.100.133 avatars1.githubusercontent.com 
151.101.100.133 avatars2.githubusercontent.com 
151.101.100.133 avatars3.githubusercontent.com 
151.101.100.133 avatars4.githubusercontent.com 
151.101.100.133 avatars5.githubusercontent.com 
151.101.100.133 avatars6.githubusercontent.com 
151.101.100.133 avatars7.githubusercontent.com 
151.101.100.133 avatars8.githubusercontent.com 
# GitHub End

保存hosts文件,重新打開Github網(wǎng)站,一切正常。


github主頁
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容