[WordPress] 外掛分享: SJ HTTP/2 Server Push Optimization

首頁外掛目錄 › SJ HTTP/2 Server Push Optimization
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
10+
安裝啟用
尚無評分
3347 天前
最後更新
問題解決
WordPress 3.0+ v1.0 上架:2017-01-16

內容簡介

HTTP/2 是新一代的 HTTP 協議,能為網絡提供巨大的能力。HTTP/2 是網絡的未來。HTTP/2 最強大的功能是伺服器推送。大多數流行的託管服務提供者都支援伺服器推送。如果明智使用,伺服器推送能夠提供顯著的性能提升。

在此處檢查 HTTP/2 展示。

伺服器推送允許伺服器將客戶端未請求的要素「打包」在一起。它在瀏覽器實現需要這些資源之前便把資源發送至瀏覽器。這樣避免了常規的 HTTP 要求/回應循環。

此外掛讓 WordPress 向每一個 enqueued 的 script 和 style page 發送一個Link:<...> rel="prefetch" header。這個控制並不影響任何網站的可視部分。

閱讀更多 伺服器推送的資訊

注意:必須使用支援 HTTP/2 的網頁伺服器。

WordPress 4.6 及以上版本

WordPress 4.6 引入了對資源暗示的支援。此控制並不管事,因為我們會將權限交由 WordPress 4.6 和主題/插件開發人員,負責預取正確的資源。

我們添加了一個篩選器,可恢復在 WordPress 4.6 及以上版本中資源暗示的舊行為。在您的 functions.php 文件或自定插件中使用以下篩選器:

`add_filter('sjh_http2_resource_hints', '__return_true');```

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「SJ HTTP/2 Server Push Optimization」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

HTTP/2 is the new generation HTTP protocol that provide tremendous powers the web. HTTP/2 is future of web. The most powerful feature of HTTP/2 is server push. Most of popular hosting providers supports to Server Push. Server Push provides significant performance gains if used judiciously.
Check HTTP/2 Demo Here.
Server Push allows the server to “bundle” assets that the client didn’t ask for.It send resources to the browser before it even realizes it needs them. This avoids the usual HTTP request/response cycle.
This plugin enabled WordPress to send a Link:<...> rel="prefetch" header to every enqueued script and style page. Is doesn’t support who output their scripts directly into the page itself. This plugin doesn’t affect any visual part of site.
Read more about server push here
Note : It requires a web server that supports HTTP/2.
WordPress 4.6 and above
WordPress 4.6 introduced support for resource hints.
This plugin defers to WordPress 4.6 and theme/plugin developers to responsibly prefetch the right assets.
I’ve added a filter To restore the old behavior of resource hints on WordPress 4.6 and above. Use following filter in your functions.php file or in a custom plugin:
`add_filter('sjh_http2_resource_hints', '__return_true');```

延伸相關外掛

文章
Filter
Mastodon