內容簡介
目前只有 retina.js 外掛的部分程式碼被取消佇列 + 注銷。
如果您發現其他相關 Retina 的外掛,請開啟支援票券並注明名稱。
我將會在這裡增加任何其他已識別到的外掛以便一併去除。
提供 Retina 圖片的問題
其中一些問題包括……
Retina 圖片檔案大小及行動裝置
Retina 圖片佔用非常多空間。如果您是經營美食網誌或
圖片託管網站,這可能還好。
否則,您的訪客在網頁上的時間可能會減少並且轉換率也下降了。
如果您是經營點擊屏蔽或針對行動裝置的網站,行動裝置可能在 3G 網路上或只有極低的 CPU 或內存。
這樣一來,Retina 圖片的檔案大小占用訪客的所有連線頻寬,然後需要大量的 CPU 與內存使用來呈現。
伺服器上的 Retina 圖片 404 錯誤
大多數提供 Retina 圖片的網站,都是使用極簡化的 retina.js 外掛。
不幸的是,這個程式碼是透過以下方式運作的……
1) 提取每一個 DOM 標籤並將網址重寫為
[email protected] 回到 DOM 中。
2)對許多網站而言,這些 [email protected] 檔案存取
100% 會造成 404(網頁不存在)的錯誤。然後 retina.js 會再次遍歷
DOM,移除圖片的 @2X ,然後重新開始取得圖片檔案。
由於這個過程是透過 AJAX 運行的,因此立即頁面流量使用可能會急劇攀升。
3)WordPress 快取外掛會特別避免快取 404 錯誤。這是故意的。這個想法是一旦您注意到 404 錯誤,您就可以修復它們。
如果 404 錯誤被快取了,每個永久性和短暫性的 404 錯誤都需要手動清除快取,才能清除快取對象,以便修復後的頁面能夠到達訪客。
4)因此,每個服務的 404 @2X 圖片都會產生極高的資源密集型的頁面檢視……而一切都是徒勞的。
5)如果您的網頁有 20 張圖片,您將產生 20 次 404 錯誤。
您可以看到這可能會導致極端的性能下降,而這很難診斷,除非您有一位 Expert 研究每天的日誌,以監視頁面檢視模式。
我主持客戶網站的一些伺服器中,顯示 90% 或以上的所有頁面存取都是對 Retina 圖片的 404 錯誤。
當流量消耗或自然流量增加時,404 錯誤會增加,把 Apache 和資料庫搞餓了,最後所有訪客都變成 Apache 500 錯誤和資料庫連接錯誤。
外掛歷史
這個程式碼最初是為我許多私人託管客戶設計的。
檢查 [http://FastStableHosting.com]http://FastStableHosting.com WordPress 加速。
這個網站還在製作中,我的目標是匯集我多年來發表的眾多檢查表,讓它們更加凝聚並退休所有其他與增強 WordPress 效能相關的網站資訊。
這個網站上的材料是基於測試而非鬼話和神話,這樣可以避免污染整個 WordPress 生態系統。
如果您想知道為什麼您一直閱讀如何增加網站速度的文章,而看起來沒有任何效果,那您可能在閱讀騙子的內容。
外掛標籤
開發者團隊
原文外掛簡介
For now only occurrences of the retina.js script are dequeue + deregister.
If you identify other Retina related scripts open a support ticket + note the name.
I’ll add any other identified scripts here, to strip them out also.
Problems Serving Retina Images
Some of these problems include…
Retina Image File Size + Mobile
Retina images have massive size. If you’re running a Food Porn blog or
Image Hosting site, this might be okay.
Otherwise, likely your visitor on page time will decrease + conversions tank.
If you’re running a Click Arbitrage site or target Mobile devices, which
may be on 3G networks or simply have under powered CPUs or little memory.
This occurs as size of Retina images eat up all your visitor’s connection
bandwidth, then require heavy CPU + memory usage to render.
Retina Image 404s On Server
Most sites serving Retina images, do so via the horribly simplistic retina.js library.
Unfortunately this script works by…
1) Extracting every DOM tag + rewriting the URL as
[email protected] back into the DOM.
2) For many sites 100% of these [email protected] file access
result in a 404 (missing page) error. Then retina.js will walk
the DOM again, removing the @2X from images + the image file
fetch begins again. Since this process runs via AJAX, instantaneously
page load resource usage can spike very high.
3) WordPress caching plugins specifically avoid caching 404 errors. This
is intentional. The idea being, once you notice 404s, you’ll fix them.
If 404s were cached, every permanent + transient 404 error would
require a manual cache flush, to clear the cache object, so the fixed
page could then reach visitors.
4) Thus every 404 @2X image served generates what tends to be an extremely
high resource intensive page view… all for nothing…
5) If you have 20 images on a page you’ll generate 20x 404s.
You can see when this can lead to extreme dips in performance,
which are hard to diagnose, unless you have a Server Savant
doing daily log studies with logtop to monitor page view patterns.
Some servers where I host client sites showed 90%+ of all page
accesses were 404s to Retina images.
As traffic spends or natural traffic increase, 404s increase,
starving Apache + Database till eventually all visitors see become
Apache 500 errors + Database Connection Errors.
Plugin History
This code was originally written to serve my many private hosting clients.
Check [http://FastStableHosting.com]http://FastStableHosting.com WordPress speedups.
This site is a work in process, where my goal is to converge all the many
checklists I’ve published over the years cohesively + retire all other
site with related WordPress performance boosting tips.
Material presented on this site is based on testing, rather than drivel + myth
which pollutes the entire WordPress ecosystem, at every turn.
If you wonder why you keep reading how to speed up your site + nothing seems
to make any difference, likely your reading content written by posers.
