[WordPress] 外掛分享: Retina Stripper

前言介紹

  • 這款 WordPress 外掛「Retina Stripper」是 2016-05-17 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2016-05-18,距離現在已有 3571 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.5.0 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

dfavor |

外掛標籤

speed | retina | server | performance | database connection |

內容簡介

目前只有 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.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Retina Stripper」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.1 | 1.2 | 1.3 | 1.4 | 1.5 | trunk |

延伸相關外掛(你可能也想知道)

  • Media Sync 》您可以掃描所有在uploads目錄中的檔案,並查看哪些檔案實際上在媒體庫中,哪些檔案只是停留在那裡。然後,您可以選擇要將哪些檔案導入數據庫,從而使它們在媒...。
  • Display PHP Version 》一個非常輕量且簡單的外掛,可以在「一覽」管理儀表板小工具中顯示目前安裝的 PHP 版本。, 在最新的版本中,你可以在懸停在 PHP 版本文字上時,查看當前的 My...。
  • WP-ServerInfo 》狀態標誌, , 開發, https://github.com/lesterchan/wp-serverinfo, 翻譯, https://translate.wordpress.org/projects/wp-plugins/wp-serverinfo, 貢獻者, , ...。
  • WP Server Health Stats 》WP Server Health Stats 外掛可以讓你監控 WordPress 網站的核心層級。透過重要的伺服器健康統計資訊,如配置的 PHP 記憶體,記憶體使用量、即時 RAM 使用量...。
  • WP-Memory-Usage 》從1.2.7版開始新增「多重記憶體測量」功能,可多次檢查記憶體使用情況。, 在儀表板和管理頁尾顯示 PHP 版本、記憶體限制和目前的記憶體使用量,現在您可以輕...。
  • PHP Version 》「PHP版本」是一個非常簡單且輕量的外掛,可幫助您在WordPress儀表板中顯示當前的PHP版本。, 如果您對此外掛感到滿意,請評價它。您的評價將鼓勵我們未來做得...。
  • WP PHP Version Display 》這是一個輕量級的 WordPress 外掛程式,可以在「一覽」管理後台小工具中顯示當前運行的 PHP/MySQL 版本。, 外掛程式僅使用標準的動作和篩選器,不使用 jQuery...。
  • AWEOS PHP Server Info 》WordPress 網站的伺服器資訊, AWEOS PHP Server Info 用於快速獲取重要的伺服器配置概覽。您可以在管理儀表板上直接檢視小工具。, 我們創建了這個工具,以鼓...。
  • WP Discord Post Plus – Supports Unlimited Channels 》WP Discord Post Plus 整合了WordPress和WooCommerce(如果安裝)以將您的新文章和訂單發送到Discord頻道。您可以為您的博客文章或WooCommerce訂單單獨配置多...。
  • WP Discord Post 》WP Discord Post 是 WordPress 的一個免費外掛程式,使用 Discord 機器人和 Webhook URL,當新文章在您的網誌上發佈時,可以寫入您所選擇的 Discord 伺服器中...。
  • Uptime Monitoring for WordPress – My Website is Online 》這個外掛程式讓你能夠透過提供一個設定頁面放置程式碼,更簡單地新增你需要的功能。, 安裝後,會建立一個新的 REST API 路由來輸出程式碼:wp-json/mywebsite...。
  • Blog Time 》此外掛會在管理列(所有管理頁面頂部)增加一個動態且實用的時鐘,顯示部落格伺服器的時間。隨著時間的流逝,時鐘會自動更新數字,和數位時鐘一樣。, 此外掛...。
  • WP HTTP Compression 》這個外掛可以讓您的 WordPress 網誌在支援壓縮的瀏覽器中以 gzip 格式輸出頁面。, HTTP 壓縮通常會使網頁大小減少 60-80%(對於寬頻用戶),並且下載速度提高...。
  • ServerBuddy by PluginBuddy.com 》ServerBuddy by PluginBuddy.com 可測試伺服器配置,以檢查主機配置問題並確定主機質量。此外,它還提供了多種工具,如WordPress CRON查看器、站點大小映射器...。
  • Memory Usage Bar 》Memory Usage Bar 是一個強大的 WordPress 外掛,讓你能夠顯示當前的記憶體使用量在管理面版的頂部。它非常方便,讓你能夠監控單次訪問的總記憶體使用量。, ...。

文章
Filter
Apply Filters
Mastodon