web_cache_killer 0.0.3
web_cache_killer: ^0.0.3 copied to clipboard
A Flutter package that solves Flutter web cache problems by automatically renaming JavaScript files with timestamps during build process.
Web Cache Killer #
Fixes Flutter web cache problems by automatically renaming JavaScript files with timestamps.
Why You Need This #
When you deploy a Flutter web app, users often see the old version because browsers cache JavaScript files. This tool fixes that by renaming your JS files with timestamps so users always get the latest version.
Installation #
dart pub global activate web_cache_killer
Quick Start #
# Go to your Flutter project folder
cd my_flutter_project
# Build and create web.zip
web_cache_killer
# Build with custom name (creates beta.zip)
web_cache_killer --name beta
# Build and upload automatically
web_cache_killer --auto-upload
What It Does #
Before:
flutter.js
main.dart.js
After:
flutter_20250801_143022_456.js
main_20250801_143022_456.dart.js
All HTML files are automatically updated to use the new names.
Commands #
Command | What It Does |
---|---|
web_cache_killer |
Build and create web.zip |
web_cache_killer --name release |
Build and create release.zip |
web_cache_killer --auto-upload |
Build and upload to tmpfiles.org |
web_cache_killer --no-zip |
Build only (no zip file) |
web_cache_killer --verbose |
Show detailed output |
web_cache_killer --no-clean |
Skip flutter clean (faster) |
Output Example #
๐ Web Cache Killer
==================================
Checking requirements...
โ
Requirements satisfied
๐งน Cleaning...
โ
Cleaned
๐ฆ Getting dependencies...
โ
Dependencies ready
๐ง Building web...
โ
Build completed
๐ Applying cache busting...
โ
Cache busting applied (3 files)
๐ฆ Creating deployment package...
โ
Successfully created web.zip (Size: 7.9M)
==================================
๐ Build Completed!
โ
Created: web.zip
๐ Build: /path/to/project/build/web
File Structure #
Default build:
build/
โโโ web/ # Your app files
โโโ web.zip # Ready to deploy
Custom name build:
build/
โโโ release/ # Your app files
โโโ release.zip # Ready to deploy
Upload Feature #
Upload your zip automatically to get a direct download link:
web_cache_killer --auto-upload
You'll get a link like: http://tmpfiles.org/dl/123456/web.zip
Common Issues #
โ "pubspec.yaml not found"
- Make sure you're in your Flutter project folder
โ "Flutter not found"
- Install Flutter: https://flutter.dev/docs/get-started/install
- Make sure
flutter
command works in your terminal
โ Upload fails
- Check your internet connection
- Your zip file is still saved locally in the
build/
folder
Requirements #
- Flutter SDK installed
- Dart 2.12+
- Run from Flutter project root (where
pubspec.yaml
is)
Features #
โ
Cross-platform - Windows, macOS, Linux
โ
Zero setup - Just install and run
โ
Cache busting - Automatic timestamp renaming
โ
Custom names - Name your builds
โ
Auto upload - Get instant download links
โ
Fast builds - Skip clean with --no-clean