Plugin Directory

Changeset 3435693


Ignore:
Timestamp:
01/09/2026 07:55:12 AM (3 months ago)
Author:
gkap186
Message:

Updated readme.txt: improved description, FAQ, fixed screenshots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • varycache/trunk/readme.txt

    r3435687 r3435693  
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Advanced variant-based caching system for A/B testing, geo-targeting, and query parameter variations. Serve different cached versions of pages.
     11Advanced caching plugin with A/B testing, geo-targeting, query parameter variations, and speed optimizations. Serve different cached versions of pages.
    1212
    1313== Description ==
    1414
    15 VaryCache is a powerful caching plugin that allows you to serve different versions of cached pages based on various conditions:
    16 
    17 = Key Features =
    18 
    19 * **A/B Testing** - Create multiple A/B tests with weighted variants
    20 * **Geo Targeting** - Serve different content based on visitor's country
    21 * **Query Parameters** - Cache variations based on URL parameters (UTM, etc.)
    22 * **REST API Caching** - Cache REST API responses for improved performance
    23 * **Cache Preload** - Automatic and manual cache warming from sitemap
    24 * **Browser Cache Headers** - Cache-Control, Expires, Last-Modified headers
    25 * **Link Prefetch/Prerender** - Instant page navigation on hover (Speculation Rules API)
    26 * **Speed Optimizations** - HTML minification, DNS prefetch, preload hints
    27 * **Disable Emoji** - Remove WordPress emoji scripts to save bandwidth
    28 * **Remove Query Strings** - Remove ?ver= from static resources
     15VaryCache is a powerful WordPress caching plugin that combines page caching with content personalization. Serve different cached versions of your pages based on A/B tests, visitor location, or URL parameters — all while maintaining excellent performance.
     16
     17= Core Caching =
     18
     19* **Page Cache** - File-based caching for fast page delivery without database overhead
     20* **REST API Cache** - Cache REST API responses to reduce server load
     21* **Cache Preload** - Automatic cache warming from sitemap
     22* **Browser Cache Headers** - Cache-Control, Expires, Last-Modified, Vary headers
     23
     24= Content Personalization =
     25
     26* **A/B Testing** - Create multiple tests with weighted variants (50/50, 70/30, etc.)
     27* **Geo Targeting** - Show different content based on visitor's country
     28* **Query Parameters** - Cache variations based on UTM tags and other URL parameters
     29
     30= Speed Optimizations =
     31
     32* **HTML Minification** - Remove whitespace to reduce page size
     33* **DNS Prefetch** - Pre-resolve external domains for faster loading
     34* **Preload Resources** - Preload fonts, CSS, and hero images for better LCP
     35* **Link Prefetch** - Preload pages on hover for instant navigation
     36* **Disable Emoji** - Remove WordPress emoji scripts (~15KB savings)
     37* **Remove Query Strings** - Better CDN caching for static resources
    2938* **Image Dimensions** - Auto-add missing width/height to prevent CLS
    30 * **File-based Caching** - Fast, lightweight caching without database overhead
     39
     40= Developer Features =
     41
     42* **Shortcodes** - Easy content switching in posts and pages
     43* **PHP Functions** - Helper functions for theme developers
     44* **Debug Panel** - Visual debugging panel on frontend
    3145* **CDN Compatible** - Works with CloudFront, Cloudflare, and other CDNs
    32 * **WP Rocket Integration** - Seamlessly integrates with WP Rocket caching
    33 * **Debug Panel** - Visual debugging panel for testing
    34 * **Shortcodes** - Easy content switching with shortcodes
    35 * **PHP Functions** - Helper functions for theme developers
     46* **WP Rocket Integration** - Compatible with WP Rocket caching
    3647* **Multisite Support** - Full multisite compatibility
    37 
    38 = Use Cases =
    39 
    40 * Run A/B tests on landing pages
    41 * Show different pricing based on user's country
    42 * Personalize content for different traffic sources (UTM parameters)
    43 * Test different headlines, CTAs, or layouts
    44 * Serve localized content based on geo location
    45 
    46 = How It Works =
    47 
    48 1. Configure your tests, geo rules, or query parameters in the admin panel
    49 2. Add shortcodes to your pages or use PHP functions in your theme
    50 3. The plugin creates separate cached versions for each variant
    51 4. Visitors are automatically assigned variants based on your rules
    5248
    5349= Shortcodes =
     
    6056= PHP Functions =
    6157
    62 `if ( varycache_is_variant( 'A' ) ) {
     58`// A/B Testing
     59if ( varycache_is_variant( 'A' ) ) {
    6360    // Show variant A content
    64 }`
    65 
    66 `if ( varycache_is_geo( 'US' ) ) {
     61}
     62$variant = varycache_get_variant(); // Returns 'A', 'B', etc.
     63
     64// Geo Targeting
     65if ( varycache_is_geo( 'US' ) ) {
    6766    // Show US-specific content
    68 }`
     67}
     68$country = varycache_get_geo(); // Returns 'US', 'RU', etc.`
    6969
    7070= Page Patterns =
    7171
    7272Flexible page matching with wildcards and regex:
     73
    7374* `/` - Homepage only
    74 * `/blog/*` - Single segment wildcard
    75 * `/blog/**` - Any depth wildcard
    76 * `~^/post/\d+$` - Regular expression
     75* `/pricing` - Exact page match
     76* `/blog/*` - Single level wildcard
     77* `/shop/**` - Any depth wildcard
     78* `~^/post/\d+$` - Regular expression (prefix with ~)
    7779
    7880= Requirements =
     
    88903. Go to Settings > VaryCache to configure
    8991
    90 = Basic Setup =
    91 
    92 1. Enable caching in the settings
    93 2. Create an A/B test or enable geo targeting
    94 3. Add pages where you want variant caching
    95 4. Use shortcodes in your content to show different versions
    96 
    97 = WP Rocket Integration =
    98 
    99 If using WP Rocket, exclude pages with variant caching from WP Rocket's cache:
     92= Quick Start =
     93
     941. Enable caching in the plugin settings
     952. Configure Page Cache to cache all pages or specific URLs
     963. Optionally set up A/B tests, geo targeting, or query parameters
     974. Use shortcodes in your content to show different versions to different visitors
     98
     99= Using with Other Cache Plugins =
     100
     101If using WP Rocket or another caching plugin, exclude pages with variant caching:
     102
    1001031. Go to WP Rocket > Advanced Rules
    101 2. Add your test pages to "Never Cache URLs"
     1042. Add your A/B test pages to "Never Cache URLs"
     105
     106VaryCache will handle caching for those pages with variant support.
    102107
    103108== Frequently Asked Questions ==
    104109
    105 = Does this work with page builders? =
    106 
    107 Yes! The shortcodes work with any page builder including Elementor, Gutenberg, Divi, and others.
    108 
    109 = How are visitors assigned to variants? =
    110 
    111 For A/B tests, visitors are randomly assigned based on configured weights and stored in a cookie. For geo targeting, the country is detected from HTTP headers (CloudFront-Viewer-Country, CF-IPCountry).
    112 
    113 = Does this affect SEO? =
    114 
    115 No. Search engines see the default variant and the canonical URL remains the same.
    116 
    117 = Can I run multiple A/B tests? =
    118 
    119 Yes! You can create multiple independent A/B tests with different pages and variants.
    120 
    121 = How long are variants cached? =
    122 
    123 You can configure the cache TTL (time to live) in settings. Default is 1 hour.
    124 
    125 = Does this work with CDNs? =
    126 
    127 Yes, but you need to configure your CDN to pass through cookies and country headers.
     110= What makes VaryCache different from other caching plugins? =
     111
     112VaryCache combines page caching with content personalization. Unlike traditional caching plugins that serve the same cached page to everyone, VaryCache can serve different cached versions based on A/B tests, visitor location, or URL parameters.
     113
     114= Can I use VaryCache just for page caching without A/B testing? =
     115
     116Yes! You can use VaryCache purely as a page cache. Enable "General Page Cache" in the Page Cache tab and configure which pages to cache. A/B testing, geo targeting, and query parameters are optional features.
     117
     118= How does geo targeting detect the visitor's country? =
     119
     120VaryCache reads country information from HTTP headers provided by CDNs:
     121- CloudFront: `CloudFront-Viewer-Country`
     122- Cloudflare: `CF-IPCountry`
     123- Custom: You can configure your own header name
     124
     125If no header is detected, the country code will be "XX".
     126
     127= Does this work with page builders like Elementor? =
     128
     129Yes! The shortcodes work with any page builder including Elementor, Gutenberg, Divi, WPBakery, and others. Simply add the shortcode blocks where needed.
     130
     131= How are visitors assigned to A/B test variants? =
     132
     133Visitors are randomly assigned based on the weights you configure (e.g., 50% variant A, 50% variant B). The assignment is stored in a cookie so they see the same variant on subsequent visits.
     134
     135= Does A/B testing affect SEO? =
     136
     137No. Search engine bots see the default variant, and the canonical URL remains unchanged. This is the recommended approach per Google's guidelines for A/B testing.
     138
     139= What are the speed optimization features? =
     140
     141VaryCache includes several Core Web Vitals optimizations:
     142- **HTML Minification** - Reduces page size by removing whitespace
     143- **DNS Prefetch** - Pre-resolves external domains (Google Fonts, Analytics, etc.)
     144- **Preload Resources** - Preloads critical fonts, CSS, and hero images (improves LCP)
     145- **Disable Emoji** - Removes WordPress emoji scripts (~15KB savings)
     146- **Image Dimensions** - Adds missing width/height to prevent layout shifts (CLS)
     147- **Link Prefetch** - Preloads pages when user hovers over links
     148
     149= How does REST API caching work? =
     150
     151You can configure specific REST API endpoints to be cached (e.g., `/wp/v2/posts`). Cached responses are served directly without executing PHP, significantly reducing server load for API-heavy sites.
     152
     153= Where are cache files stored? =
     154
     155Cache files are stored in `wp-content/cache/varycache/`. Settings are stored in `wp-content/uploads/varycache/settings.json`. Both locations are WordPress-compliant.
     156
     157= Can I clear the cache programmatically? =
     158
     159Yes, use `VaryCache_Cache::clear_cache()` in your code. The cache is also automatically cleared when posts are saved or deleted.
     160
     161= Does VaryCache work with CDNs? =
     162
     163Yes, but for A/B testing and geo targeting to work correctly, configure your CDN to:
     164- Pass through cookies (for A/B test variant assignment)
     165- Forward country headers (for geo targeting)
    128166
    129167== Screenshots ==
    130168
    131 1. A/B Tests configuration
    132 2. Geo targeting settings
    133 3. Query parameters configuration
    134 4. Cache report
    135 5. Debug panel on frontend
     1691. VaryCache admin panel - flexible caching plugin for dynamic content
    136170
    137171== Changelog ==
    138172
    139173= 1.2.0 =
    140 * NEW: Speed optimization tab with performance features
     174* NEW: Speed optimization tab with Core Web Vitals features
    141175* NEW: HTML Minification - reduce page size by removing whitespace
    142176* NEW: DNS Prefetch - pre-resolve external domains for faster loading
     
    178212
    179213= 1.2.0 =
    180 New Speed tab with Core Web Vitals optimizations: HTML minification, DNS prefetch, preload hints, disable emoji, image dimensions. Highly recommended.
     214New Speed tab with Core Web Vitals optimizations: HTML minification, DNS prefetch, preload hints, disable emoji, image dimensions. Highly recommended update for better performance.
    181215
    182216= 1.1.0 =
     
    185219= 1.0.0 =
    186220Initial release.
    187 
Note: See TracChangeset for help on using the changeset viewer.