Comments (8)
I just noticed there might be some stuff regarding this in the v3
branch, will have a look at it!
from offline-plugin.
I just noticed there might be some stuff regarding this in the v3 branch, will have a look at it!
Hi @amiuhle, yes, this is resolved in v3
, but it's not ready yet. CHANGELOG
contains all the information about what was changed, but if you will need any help--let me know.
Right now I can refresh the Browser all day, unless I close the tab the SW will always give me the old, cached content...
Yes, this is how SW works by default unless you tell to it to behave differently.
For AppCache, this results in a changed manifest file, which will download the new files and fire an updateready event. I can then tell the user that there is new content available and refresh the page.
Fun fact, at first I started making those events for AppCache first, but events are so buggy and inconsistent between browsers when AppCache is used from iframe. I literally spent 2 weeks trying to make it "right" and then gave up. I will probably make AppCache disabled by default in v3
, because I have it now, but still will support it as fallback.
Should we close this now or may be you have some suggestions here?
from offline-plugin.
Thanks for the feedback!
I just started playing with the v3 branch. I'll mention this issue, should I make any PRs regarding v3
functionality.
from offline-plugin.
should I make any PRs regarding v3 functionality.
Yes, please. Feel free to do that. Any help is welcome :-)
from offline-plugin.
So, I'm successfully using the v3
now, using updateStrategy: 'all'
.
I'm supplying all supported callbacks for runtime.install
, and onUpdateReady
is called when the version changes. However, I can do a window.location.reload(true)
, but the old SW will still only serve my old content, and the new one is not updated.
Do you have update functionality working? Can you supply your configuration, please?
Also, the README is not up to date in the v3
branch. I understand you don't want to update the documentation before the features are final, but maybe you could open an issue as a roadmap for v3 where you have a TODO list and a rough outline of where you want to go with v3. I really would like to help, but without understanding where you're going with the next version, it's kind of hard...
from offline-plugin.
I just saw the applyUpdate
function, so forget the top half of my last comment.
I still think a 'v3 Roadmap' issue would be a good idea though!
from offline-plugin.
Also, the README is not up to date in the v3 branch.
I am working on update README, but yes, it's not in priority.
but maybe you could open an issue as a roadmap for v3 where you have a TODO list and a rough outline of where you want to go with v3.
Sounds good. I can do that. Basically what I plan for v3
is marked as milestone 3.0
in issue. Not all issues marked 3.0
must be in it, but this is how I mark them "for next release".
I will make a pull request from v3
to master
and will describe what I plan for v3
. But I still prefer to track thing in issues, e.g. one issue per problem/feature. Probably I can just make a list of issues in that PR.
... and, thanks for your suggestions and willingness to help :-)
from offline-plugin.
Btw, this is how I use update events:
const runtime = require('offline-plugin/runtime');
runtime.install({
onUpdating: () => {
console.log('SW Event:', 'onUpdating');
},
onUpdateReady: () => {
console.log('SW Event:', 'onUpdateReady');
runtime.applyUpdate();
},
onUpdated: () => {
console.log('SW Event:', 'onUpdated');
window.location.reload();
},
onUninstalled: () => {
console.log('SW Event:', 'onUninstalled');
}
});
from offline-plugin.
Related Issues (20)
- Question - SW caching all assets site-wide HOT 1
- In Angular 9, files inside directories are not being cached
- Ideas for Documentation to Help with Troubleshooting
- Some files missing in cache on SW first load/install HOT 1
- Caching subpath urls
- Caching fails to download assets in Chrome 85 HOT 1
- Issue with default path
- [question] Having Multiple runtime installations
- Problem with Webpack 5.0 HOT 17
- Micro Front-ends structure with single-spa
- Auto update doesn't work
- After removing redux-offline, how do we ensure that client's who have old versions get the latest update?
- `onInstalling` doesn't seem to be called, because `ignoreInstalling` is always true
- offline-plugin does not serve assets from service worker
- Webpack 5 compatibility HOT 3
- The "path" argument must be of type string. Received undefined HOT 4
- Cache Images from AWS S3
- Pass ServiceWorker version to the install events
- Terser Plugin issue while building with webpack-cli HOT 3
- upgrade ejs package | CVE-2022-29078 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from offline-plugin.