
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
firetruck.js
Advanced tools
Offline caching adapter for Firebase JavaScript API
Firetruck is a proof-of-concept offline caching adapter for the Firebase API. It persists responses through to either IndexedDB, localStorage or WebSQL depending on browser support. This project is targeted at applications with simple to intermediate complexity.
This is not an official Firebase project. It is inspired by previous efforts such as cached-firebase.
I have previously explored caching for set() operations with queues, however this has been stripped back for now until we can decide on a clean API for handling that problem.
Install Firetruck locally:
$ npm install --save firetruck.js
Require Firetruck in your project:
var Firetruck = require('firetruck.js');
Where you would normally create a new instance of Firebase, create a new Firetruck instance instead. E.g:
Instead of doing:
var api = new Firebase('https://hacker-news.firebaseio.com/v0');
Do this:
var api = new Firetruck('https://hacker-news.firebaseio.com/v0');
Offline caching will work transparently. You can now use methods like .on(), .once(), .child() etc. and in the event of the page being accessed while offline, the browser cache (IDB, LS, WebSQL) will be read for responses instead.
Should you need to restore data on pageload (a common requirement), you can call:
api.restore();
If you need to switch off offline-caching, this can be achieved via:
api.switchOffCaching();
switchOnCaching() can be used should you need to turn caching back on after this operation.
Copyright Google. Licensed under an Apache-2.0 license.
FAQs
Offline caching adapter for Firebase JavaScript API
We found that firetruck.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.