=== HostKarle Speed Boost ===
Contributors: hostkarle
Tags: cache, performance, speed, lazy load, minify
Requires at least: 5.3
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 2.0.3
License: GPLv2 or later

Makes WordPress sites load faster: page cache, compression, CSS/JS optimisation, delayed scripts, lazy-loading, preloading and database clean-up. Works with the HostKarle India CDN and on its own.

== What it does ==
* India CDN (node): registers on activation, clears changed pages on publish/edit/delete/comments, clears everything on theme/menu/widget/plugin/permalink changes and on every settings change. Admin bar: Clear cache, Clear this page, Pause 1 hour / Resume.
* Page cache on this server (when the site is not on the CDN, or set to Always): pages stored in wp-content/cache/hksb/pages, served by .htaccess rules (no PHP) or the advanced-cache.php drop-in. Never for logged-in users, POST, query strings (except utm_* / gclid / fbclid), cart/checkout/account, login/admin.
* .htaccess block "# BEGIN HostKarle Speed Boost": Brotli + GZIP, 1-year browser cache for static files, ETag off, CORS for fonts. Removed on deactivation.
* HTML: minify, remove emoji / embed scripts, optional jQuery Migrate removal, Dashicons for visitors.
* CSS: minify into hashed copies (wp-content/cache/hksb/assets), font-display: swap, optional combine, non-blocking Google Fonts, optional async CSS.
* JS: minify unminified files, defer, delay until first interaction (dependency-aware; consent banners, captchas, cart fragments, payment buttons always excluded), optional move to footer.
* Media: main image (LCP) gets fetchpriority=high + preload and is never lazy; first N images eager; lazy images, iframes, inline background images, autoplay videos; YouTube/Vimeo preview facade; missing width/height added.
* Preload: preconnect to outside hosts, font preload, prefetch on hover, cache rebuild crawler (sitemap, 8 pages a minute).
* Database: heartbeat control, clean-up of revisions, auto-drafts, trash, spam, expired transients, OPTIMIZE TABLE (weekly or by hand).
* Safe mode: one click turns off every page change (caching and compression keep working).
* PageSpeed score card (Google PageSpeed Insights, mobile). Optional key: define( 'HKSB_PSI_KEY', '...' ).
* Self-update from HKSB_UPDATE_URL (default https://speed.hostkarle.in/plugin/info.json).
* Shows other cache/optimisation plugins with a "Deactivate" button the customer presses.

== Constants ==
* SB_NODE_URL - talk to the node at another address (e.g. https://<node-ip>).
* HKSB_UPDATE_URL - update info JSON.
* HKSB_PSI_KEY - Google API key for the score card.
* HKSB_NO_OPTIMIZE / DONOTOPTIMIZE - skip page changes for a request; DONOTCACHEPAGE - do not store it.

== Changelog ==
= 2.0.3 (2026-11-11) =
* Tools tab no longer shows the access token (the speed.hostkarle.in control page is gone).

= 2.0.2 (2026-11-10) =
* Scripts that add the "js" class to the page are never delayed (mobile menus no longer show open before the first tap).

= 2.0.1 (2026-11-09) =
* PageSpeed score card removed.

= 2.0.0 (2026-11-09) =
* Full caching and optimisation plugin (see above). Settings in one option (hksb_settings), top-level "Speed Boost" menu with tabs.
* Update URI is now https://speed.hostkarle.in/plugin/.

= 1.0.1 (2026-11-09) =
* Purges run after the response; old URL purged on unpublish/slug change/trash; uninstall cleans up; token shown; Update URI header.

= 1.0.0 (2026-11-04) =
* First release: CDN node remote control.
