
內容簡介
不要只是壓縮與合併結尾為 CSS/JavaScript 檔案,最終產生龐大、膨脹且載入速度緩慢的網頁:先削減「脂肪」,讓網站速度更快 🙂
載入速度更快 = 參觀者更開心 = 轉換率更高 = 收益更多
通常情況下,當您使用主題和多個插件並啟用並運行它們時,存在這樣的情況。但是,您不需要使用所有插件,為了提高網站的速度並使 HTML 源代碼更清潔(方便調試用途),最好防止加載那些不需要的樣式和腳本。
例如,您可能會使用一個生成聯繫表單的外掛,並且它會在您的網站的每個頁面上加載其資源(.CSS 和 .JS 文件),而不僅僅是在 /contact 頁面上(如果那是您需要的唯一場所)。
「Asset CleanUp」掃描您的頁面並檢測到所有已載入的資源。當編輯頁面/文章時,您只需選擇不需要載入的 CSS/JS,從而減少膨脹。
該外掛與緩存外掛(例如 WP Rocket、WP Fastest Cache、W3 Total Cache)、提供有服務器級緩存可用的託管公司(例如 WP Engine、Kinsta)或啟用頁面緩存的 Cloudflare 服務一起使用效果更佳。
該外掛的主要優點包括
通過卸載無用的 CSS/JS 減少已載入的 HTTP 請求數量並消除渲染阻止資源(對於更快的頁面載入很重要)
預先加載 CSS/JS、本地字體和 Google 字體文件以指示瀏覽器盡快下載所選資源
壓縮 CSS 文件(包括 STYLE 標籤內的內嵌代碼)
壓縮 JavaScript 文件(包括 SCRIPT 標籤中的內嵌代碼)
合併其餘已載入的 CSS 和 JavaScript 文件
內聯 CSS 文件(通過自動設置或指定樣式表路徑的方式)
透過將「defer」屬性應用於 SCRIPT 標記來延遲合併的 JavaScript 文件
如果未使用,將網站範圍的 Emojis、Dashicons(供訪客使用)和 Comment Reply 刪除
禁用 RSS 饋送
減少實際頁面的 HTML 代碼(如果啟用 GZIP 壓縮,那會更好)
在開發人員想要搜索某些內容的情況下,使源代碼更容易掃描
解決可能存在的插件/主題之間的衝突(例如,從不同插件加載的 2 個 JavaScript 文件,它們相互干擾)
如果您在網站上使用 GTmetrix、PageSpeed Insights、Pingdom 網站速度測試等網站測試您的 URL,表現更佳的性能得分
由於更快的頁面載入是搜索排名的因素之一,因此 Google 將更喜歡您的網站
您的服務器存取日誌文件(例如 Apache 文件)將更易於掃描,在您的服務器上佔用更少的空間
Google 字體優化/刪除
將所有 Google 字體請求合併為較少請求(通常為一個),為每個額外字體請求節省一個往返到服務器
從呈現時阻止、透過 Web Font Loader(webfont.js)進行異步處理或透過預加載 CSS 樣式表進行異步處理之間選擇三種交付方式
從 fonts.gstatic.com 預加載 Google 字體文件(例如以 .woff2 結尾的文件)的選項
將「font-display」CSS 屬性應用於所有已載入的 Google 字體請求
針對使用 Google 字體的 fonts.gstatic.com 啟用預連接資源提示;在瀏覽器開始進行 DNS/TCP/TLS 之前,不要讓瀏覽器等待取回用於加載字體文件的 CSS
刪除包括鏈結/字體預加載在內的所有 Google 字體請求
外掛標籤
開發者團隊
② 後台搜尋「Asset CleanUp: Page Speed Booster」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
Most WordPress sites load unnecessary CSS and JavaScript files, making pages slower than they should be. Strip the “fat” first and get a faster website!
Faster page load = Happier Visitors = More Conversions = More Revenue 🙂
When using a theme and multiple plugins, many styles and scripts are loaded on every page, even when they are not needed. Preventing unnecessary assets from loading makes your website faster and the HTML output cleaner.
For example, a contact form plugin may load its CSS and JavaScript files on every page, even if the form is only used on the contact page.
Asset CleanUp scans your page and shows all loaded assets. You can then unload the ones that are not needed, reducing page bloat and improving load speed.
The plugin works best alongside a caching plugin or CDN (e.g. Cloudflare) for maximum performance.
Main plugin’s benefits include
Unload (prevent from loading) unnecessary CSS & JavaScript files and decrease HTTP requests
Eliminate render-blocking resources for faster page load
Improve Core Web Vitals and performance scores (PageSpeed, GTmetrix, Pingdom)
Combine and minify remaining CSS & JavaScript files (including inline code)
Defer JavaScript execution to improve loading speed
Inline critical CSS for faster rendering
Preload important assets such as CSS, JavaScript, local fonts & Google Fonts
Remove unused features such as Emojis, Dashicons (for guests) and Comment Reply
Disable RSS feeds if not needed
Reduce overall HTML size (especially effective with GZIP compression enabled)
Prevent potential conflicts between plugins and themes
Make source code cleaner and easier to debug
Google Fonts Optimization / Removal
Reduce the number of Google Font requests by combining them into fewer requests (faster loading)
Load Google Fonts asynchronously or via preload to avoid render-blocking issues
Preload Google Font files for improved performance
Apply font-display to ensure text remains visible while fonts are loading
Enable preconnect to speed up font delivery
Option to completely remove Google Fonts (including all related requests)
Local Fonts Optimization
Preload local font files for faster rendering
Apply font-display to improve text visibility during font loading (important for PageSpeed)
Critical CSS
Add your own critical CSS to improve above-the-fold loading speed
Supports homepage, posts, pages, taxonomies, archives, search and 404 pages
Can be managed directly from the Dashboard or via code / Read More
Clean up unnecessary code from HEAD & BODY
Remove unused WordPress tags (RSD, REST API, shortlinks, generator meta, etc.)
Disable RSS feed links if not needed
Remove oEmbed scripts if you don’t use embedded content
Strip unnecessary HTML comments (with exceptions support)
Each option can be enabled or disabled individually, giving you full control over how your site is optimized. Clear instructions are available directly in the plugin’s settings.
Disable partially or completely XML-RPC protocol
Disable XML-RPC if not needed (improves security and reduces unnecessary access)
Keep it enabled if you rely on external apps or services
Fully compatible with WordPress Multisite networks
Asset CleanUp Pro
This is the lite version of Asset CleanUp Pro, which offers advanced control over how CSS & JavaScript files are loaded across your entire website.
Learn more about the Pro version
NOTES
If something is not working as expected or you have any suggestions, feel free to open a thread in the support forum, and I’ll be happy to help.
If you enjoy using the plugin, a review is always appreciated.
GO PRO
Unlock advanced control over how CSS & JavaScript files load across your entire website
Unload (prevent from loading) CSS/JS files across all pages (including taxonomies, archives, search and 404 pages)
Disable entire plugins in the frontend or Dashboard to reduce load time and avoid conflicts
Load assets conditionally based on screen size (e.g. skip unnecessary files on mobile)
Defer or async JavaScript files for faster page rendering
Move CSS & JS between HEAD and BODY to reduce render-blocking resources
Inline JavaScript when needed for better performance
Get faster updates, early access to new features and premium support
Ready to take full control of your website’s performance?
Upgrade to Asset CleanUp Pro
