CDN Versioning & Cache Busting
Independent version control for each asset type
What is CDN Versioning?
CDN Versioning adds a custom version parameter (?1cdnver=YOUR_VERSION) to all CDN URLs. This forces browsers and CDN servers to fetch new versions of your assets when you update them, instead of serving cached old versions.
How to Configure
Location: 1 CDN Manager → Settings → Advanced Tab
Available Versioning Options
1. Image Versioning
Applies to: .jpg, .png, .gif, .svg, .webp, .ico, .bmp files
Toggle: Enable/disable image versioning
Version String: Enter your custom version (e.g., "1.1", "2024-10")
Example:
Before: https://img-cdn.example.com/logo.png
After: https://img-cdn.example.com/logo.png?1cdnver=1.1
2. Media Versioning
Applies to: .mp4, .mp3, .webm, .ogg, .avi, .mov files
Toggle: Enable/disable media versioning
Version String: Enter your custom version
Example:
Before: https://media-cdn.example.com/video.mp4
After: https://media-cdn.example.com/video.mp4?1cdnver=1.2
3. CSS Versioning
Applies to: .css files on CSS CDN
Toggle: Enable/disable CSS versioning
Version String: Enter your custom version
Example:
Before: https://static-cdn.example.com/style.css?ver=wc-10.2.2
After: https://static-cdn.example.com/style.css?1cdnver=1.3
4. JavaScript Versioning
Applies to: .js files on JavaScript CDN
Toggle: Enable/disable JavaScript versioning
Version String: Enter your custom version
Example:
Before: https://static-cdn.example.com/script.js?ver=1.0
After: https://static-cdn.example.com/script.js?1cdnver=1.4
5. Fonts Versioning
Applies to: .woff2, .woff, .ttf, .otf, .eot files
Toggle: Enable/disable fonts versioning
Version String: Enter your custom version
Example:
Before: https://fonts-cdn.example.com/font.woff2
After: https://fonts-cdn.example.com/font.woff2?1cdnver=1.5
Version String Format
You can use any string format for your versions. Common patterns:
| Format | Example | Use Case |
|---|---|---|
| Semantic | 1.0, 1.1, 2.0 | Major/minor updates |
| Date | 2024-10-14, 20241014 | Time-based releases |
| Hash | abc123, git-a1b2c3 | Git commit based |
| Custom | fall-release, v2-prod | Named releases |
Real-World Use Cases
Scenario 1: CSS Hotfix
Problem: You fixed a CSS bug but users still see the old broken styles.
Solution:
- Current CSS version: 1.0
- Update CSS Versioning to: 1.1
- Save settings
- All CSS URLs now have ?1cdnver=1.1
- Browsers fetch new CSS file immediately
Result: Bug fix visible to all users instantly, without clearing cache
Scenario 2: Major Site Redesign
Problem: Complete frontend overhaul with new CSS, JS, and images.
Solution:
- Update all versions from 1.0 to 2.0:
- CSS: 1.0 → 2.0
- JS: 1.0 → 2.0
- Images: 1.0 → 2.0
- Save settings
- All assets force refresh
Result: Complete redesign loads for all users without cache issues
Scenario 3: Staged Rollout
Problem: Want to roll out changes gradually over multiple weeks.
Solution:
- Week 1: Update CSS version (1.0 → 1.1)
- Week 2: Update JS version (1.0 → 1.1)
- Week 3: Update Images version (1.0 → 2.0)
Result: Each week, only changed assets refresh, others use cache
Technical Details
Version Parameter
1 CDN Manager uses 1cdnver as the version parameter name (not standard ver).
Aggressive Replacement
The plugin removes ALL existing version parameters before adding yours:
- Removes: v, ver, version, _v, _, rev, r, 1cdnver
- Adds: 1cdnver=YOUR_VERSION
This ensures WordPress default versions (like ?ver=wc-10.2.2) are completely replaced.
Query String Handling
If a URL already has query parameters, the version is appended:
Original: https://cdn.example.com/file.css?param=value
Result: https://cdn.example.com/file.css?param=value&1cdnver=1.3
📖 How-To: Step-by-Step Versioning Guide
Scenario 1: You Updated Your CSS Styles
Problem
You made changes to your site's CSS but visitors are still seeing the old design because their browser cached the old stylesheet.
Solution with Versioning
- Make your CSS changes and save the file
- Go to 1 CDN Manager → Settings → Advanced Tab
- Find "CSS Versioning" section
- Make sure toggle is ON
- Change version number:
- If it was
1.0→ change to1.1 - If it was
1.1→ change to1.2
- If it was
- Click "Save Changes"
- Clear all caches (WordPress + CDN + Browser)
- Result: All visitors now get the fresh CSS!
What happens behind the scenes:
Old URL: https://static-cdn.example.com/style.css?1cdnver=1.0
New URL: https://static-cdn.example.com/style.css?1cdnver=1.1
Browser sees different URL → Fetches fresh file!
Scenario 2: You Replaced Images on Your Site
Problem
You uploaded new product images with the same filename, but the old images are still showing.
Solution with Versioning
- Upload your new images (they replace the old ones)
- Go to 1 CDN Manager → Settings → Advanced Tab
- Find "Image Versioning" section
- Toggle ON (if not already)
- Increment version:
1.0→1.1 - Click "Save Changes"
- Purge CDN cache (if using Cloudflare)
- Result: New images appear immediately!
Scenario 3: Major Site Redesign
Problem
You're launching a complete redesign with new CSS, JS, images, and fonts.
Solution with Versioning
- Go to 1 CDN Manager → Settings → Advanced Tab
- Enable ALL versioning types:
- ✅ Image Versioning
- ✅ Media Versioning
- ✅ CSS Versioning
- ✅ JavaScript Versioning
- ✅ Fonts Versioning
- Set ALL to version 2.0 (major version bump)
- Click "Save Changes"
- Deploy your redesign
- Purge all caches
- Result: Complete cache bust - everyone sees the new design!
Scenario 4: Troubleshooting - Changes Not Showing
Problem
You updated files and changed version numbers, but changes still aren't showing.
Troubleshooting Checklist
- Verify versioning is enabled
- Check toggle is ON for the asset type
- Verify version string is not empty
- Clear WordPress cache
- WP Rocket, W3 Total Cache, etc.
- Or: 1 CDN Manager → Tools → Clear Cache
- Purge CDN cache
- Cloudflare: Purge Everything
- Or use plugin's Cloudflare integration
- Hard refresh browser
- Windows: Ctrl + Shift + R
- Mac: Cmd + Shift + R
- Or open incognito/private window
- Verify in page source
- Right-click → View Page Source
- Search for
?1cdnver= - Check if your new version is there
Scenario 5: Using Different Versions for Different Assets
Use Case
You want to track changes separately for CSS, JS, and images.
Solution
Each asset type can have its own version number!
Images: Version 1.5 (Updated product photos)
CSS: Version 2.0 (Major style changes)
JavaScript: Version 1.8 (Minor bug fixes)
Fonts: Version 1.0 (No changes)
Media: Version 1.2 (New promo video)
Benefit: Clear tracking of what changed and when
- Changelog shows: "v2.0 - Updated CSS with new color scheme"
- Later: "v1.6 - Updated product images"
- Even later: "v1.9 - Fixed JavaScript cart bug"
Best Practices
- ✅ Use semantic versioning (1.0, 1.1, 2.0) for easy tracking
- ✅ Document version changes in your changelog
- ✅ Test on staging site before changing production versions
- ✅ Increment version only when assets actually change
- ✅ Use different versions for different asset types when appropriate
- ✅ Keep version strings short for smaller URLs
- ❌ Don't change versions unnecessarily (wastes bandwidth)
- ❌ Don't use spaces or special characters in version strings
Troubleshooting
Old versions still loading?
- Clear WordPress cache (if using caching plugin)
- Clear browser cache
- Check page source - verify new version parameter is present
- Purge CDN cache (Cloudflare, etc.)
Version not showing in URL?
- Verify versioning toggle is enabled for that asset type
- Verify version string is not empty
- Check that CDN is enabled for that asset type
- Test with Tools → Test CDN