[WordPress] 外掛分享: WP-PJAX

前言介紹

  • 這款 WordPress 外掛「WP-PJAX」是 2013-03-26 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2013-04-02,距離現在已有 4415 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.5 以上版本才可以安裝。
  • 有 4 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

pekz0r |

外掛標籤

pjax | cache | speed | performance | optimization |

內容簡介

此外掛仍在實驗階段 - 使用需自負風險!

此外掛仍在開發中,請嘗試使用並聯繫我,如果您遇到任何錯誤或有任何問題或建議。如果您想幫助我進一步開發,請在GitHub上發送拉取請求。

該外掛尚未準備好投入生產,但我將很快發布0.1版,以便為生產做好準備。

WP-PJAX — PJAX for WordPress 外掛程式。

讓您的網站更快,並通過使用 PJAX 驅動的 WordPress 網站節省大量帶寬和 CPU 運算!

PJAX 是什麼?

PJAX 是一種技術,使用 AJAX 和 PushState,僅在每次頁面載入時加載和更新頁面 HTML 的部分。PushState 可以添加真實的永久鏈接,頁面標題和可用的 “返回” 按鈕,以便您的訪問者無法看出 PJAX 頁面載入和普通完整頁面載入之間的區別,當然速度快了些 🙂

為什麼要使用 PJAX?

它可以在大多數情況下使您的網站顯著加快,同時節省了處理能力和帶寬!

特點

加快任何網站的速度。啟用內置頁面緩存後,您可以期望頁面加載速度比以前快10-50%+。
支持 4 級應用程序緩存!此外掛使用瀏覽器緩存和頁面緩存。 (可選) 除去會話和 cookie,並啟用反向代理 (例如 Varnish) 緩存,並且與第三方緩存外掛 (例如 W3 Total Cache 推薦) 下的對象和數據庫緩存非常配合。
與W3 Total Cache 配合良好。
可配置。無需深入研究代碼。但是,您仍需要基本的 HTML 知識以及了解 WordPress 運行方式,以發揮此外掛的全部潛力。
每頁載入都會有一個帶有報告的實時通知 (載入時間,頁面緩存的命中或未命中,反向代理/ Varnish 緩存的命中或未命中等 — 請見屏幕截圖)。這對於調試和測試非常有用,當然只對管理員可見。
只需對您的主題進行幾個更改,即可輕鬆使用。不應該需要超過5分鐘的時間,並且僅需要基本知識。

瀏覽器支援

PJAX 不支援 Internet Explorer 9 及以下版本(IE 10+ 可支援),但該外掛程式通過在不支援的瀏覽器上回歸常規頁面載入來優雅地處理此問題。 有關瀏覽器支援的詳細信息

開發

此外掛的所有開發都在GitHub 上進行。請通過fork並發送拉取請求來幫助開發。

計劃中的功能 / 待辦事項

更好的選單活動類別處理。可能會使用正則表達式。支持標記父頁面活動將是很好的,但我不知道任何好的方法實現它。
更好地控制禁用 PJAX 的例外情況,當您使用頁面緩存時以及應該刪除哪些 cookie 和會話。將添加正則表達式支持。
在發布/更新時刷新緩存。
使用單獨的緩存加載側欄。
頁面載入通知/圖標。這也應該可定制,使用 css、文本(本地化)來,並且應該可以上傳自己的圖標。
頁面緩存預取需要重新檢討。WP-Cron有些

原文外掛簡介

THIS PLUGIN IS STILL EXPERIMENTAL – USE AT YOUR OWN RISK!
The plugin is under development. Please try it and contact me if you encounter any bugs or have any questions or suggestions. If you want to help me develop this further send a pull request on GitHub.
The plugin is not ready for production yet, but I will soon release version 0.1 that will be production ready.
WP-PJAX – PJAX for WordPress Plugin.
Makes your site faster and saves you a lot of bandwidth and CPU power by making your WordPress site PJAX powered!
What is PJAX?
PJAX is a technique that uses AJAX and PushState to deliver a faster browsing experience by only loading and updating parts of the page HTML each page load. PushState makes it possible to add real permalinks, page titles, and a working back button so that your visitors won’t be able to tell the difference between PJAX page load and ordinary full page loads, except for the increased speed of course :).
Why PJAX?
It makes your site significantly faster in most cases and saves you both processing power and bandwidth!
Features

Speeds up any website. With the built in page cache enabled you can expect 10-50+% faster page loads.
Supports 4 Levels of application cache! This plugin uses browser cache and page cache. It is also enabling reverse proxy(i.e. Varnish) cache by (optionally) striping sessions and cookies and it works very well with underlaying object and database cache using third party cache plugins such as W3 Total Cache (recommended).
Works well with W3 Total Cache.
Configurable. No need to dig into the code. You will still need basic knowledge about HTML and how WordPress works to make this plugin reach it’s full potential.
Live notices with a report for every page load (Load time, page cache hit or miss, Reverse proxy/Varnish cache miss or hit etc – See screenshot). This is great for debugging and testing and is of course only visible for admins.
Only a few changes in your theme and you are ready to go. Should not take more than 5 minutes and requires only basic knowledge.

Browser support
PJAX is not supported in Internet Explorer 9 and earlier(IE 10+ supports this), but the plugin handles this gracefully by falling back on regular page loads for unsupported browsers. Details on browser support
Development
All development of this plugin occurs on GitHub. Please help me develop this by forking and sending pull requests.
Planned features / To-Do

Better handling of menu active classes. Will probably use regex for this. Support for marking parent pages active would be nice but I don’t know any good ways to accomplish that.
Better control over exceptions for when to disable PJAX, when you use Page cache, and when and what cookies and sessions that should be striped. Regex support will be added.
Refresh cache on publish/update.
Separate loading of sidebars with separate cache.
Page loading notice / icon. This should also be customizable with css, text(localizable) and it should be possible to upload your own icon.
Page cache prefetch needs to be revisited. WP-Cron is a bit tricky and its hard to handle timeouts gracefully and reliably cross different environments.
Remove all debug code and general code cleanup. This will be finished before the 0.1 release.
Add an optional menu to the admin bar for clearing cache(all and current page).
Optimize execution flow for better performance
Maybe: Better way to generate the configurable javascript. I think of two options for this, ether use wp_localize_script to inject variables into javascript or to generate a javascript with PHP file when settings are saved.

Known issues

The PJAX toggle checkbox does not work. $.pjax.disable() does not seam to work as it should. Maybe I need to set a cookie with AJAX to set this for the current user and then handle it on the server side.

Development
All development of this plugin occurs on GitHub. Please help me develop this by forking and sending plull requests.

各版本下載點

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

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


0.1a | 0.0.2 | 0.0.3 | 0.0.4 | trunk | remove | 0.0.3.1 | 0.0.3.2 | 0.0.3.3 | 0.0.4.1 |

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

  • LiteSpeed Cache 》LiteSpeed Cache for WordPress(LSCWP)是一種全方位的網站加速外掛,包括獨家的伺服器層快取和一系列的優化功能。, LSCWP 支援 WordPress Multisite 及大多...。
  • Jetpack – WP Security, Backup, Speed, & Growth 》search engines, and grow your traffic with Jetpack. It’s the ultimate toolkit for WordPress professionals and beginners alike., , Customize and des...。
  • Image Optimizer – Optimize Images and Convert to WebP or AVIF 》外掛總結:, , - Image Optimizer 是一個易於使用的 WordPress 外掛,透過壓縮和調整大小的技術來減少圖像大小,同時保留最高的圖像品質。, - Image Optimize...。
  • WP Super Cache 》本外掛可以從您的動態 WordPress 部落格生成靜態 HTML 檔案。在產生 HTML 檔案後,您的網頁伺服器會傳送該檔案,而不是處理比較沉重、耗費更多資源的 WordPre...。
  • WP Fastest Cache 》han PNG or JPEG, which means faster downloads and less data consumption for your visitors, Database Cleanup – Detect and delete unnecessary d...。
  • ManageWP Worker 》, Want to clone or migrate your WordPress website to a new host or domain? No problem! With ManageWP, you can easily clone or migrate your website ...。
  • W3 Total Cache 》W3 Total Cache (W3TC) 透過整合內容傳遞網絡 (CDN) 和最新最佳實踐等功能,提高網站性能、減少加載時間,增進 SEO、核心 Web 主要指標和整體用戶體驗。W3TC ...。
  • Speed Optimizer – The All-In-One Performance-Boosting Plugin 》SiteGround Optimizer 插件是由 SiteGround 開發的,可以大幅提高任何托管環境下的 WordPress 網站性能。, 最初設計用於 SiteGround 的服務器,現在已經有近 ...。
  • Autoptimize 》Autoptimize 能夠輕鬆優化您的網站。它可以整合、縮小和快取腳本和樣式表,在默認情況下向頁面 head 中注入 CSS,但也可以內嵌關鍵 CSS 並延遲整合的完整 CSS...。
  • AMP 》「Page Experience」(PX)是一組排名訊號,包括「核心網頁素質」(Core Web Vitals,CWV),用來測量使用者與網頁互動的使用體驗。AMP 是一個強大的工具,能...。
  • WebP Express 》ch means less bandwidth usage and faster page load times., Easy to use - with little effort, WordPress site admins can have their site serving auto...。
  • Breeze – WordPress Cache Plugin 》Breeze是由Cloudways團隊開發的一款免費、簡單(卻功能強大)且使用者友好的WordPress快取外掛。它提供不同層級的WordPress效能優化選項,在WordPress、搭配W...。
  • Jetpack Boost – Website Speed, Performance and Critical CSS 》使用 Jetpack Boost 優化網頁性能加速你的 WordPress 網站。輕鬆啟用一鍵優化,提升核心 Web 重要指標。, 你是否知道,更快的網站可以:, , 在 Google 搜尋排...。
  • Custom Fonts – Host Your Fonts Locally 》此外掛能協助您輕鬆地在 WordPress 網站中嵌入自定義字型檔案 (woff2、woff、ttf、svg、eot、otf)。, 目前能與以下主題和外掛一起使用:, , Astra 主題, Beav...。
  • Redis Object Cache 》一個由 Redis 提供支援的持久化物件快取後端。支援 Predis、PhpRedis (PECL)、Relay、複寫、哨兵、叢集化和 WP-CLI。, 若要調整連線參數、前綴的快取鍵或設定...。

文章
Filter
Apply Filters
Mastodon