You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Progressive Web Apps (PWAs) utilize Service Workers which may be used to implement offline functionality for apps. This however only works for requests performed with the native Fetch API (see 1 and the Exposed attribute in the spec 2).
Since Inertia comes with Axios (and therefore uses XHR) it seems impossible to achieve offline functionality right now.
I'm aware of several closed PRs (#91, #29, #19) and the fact that the Fetch API does not support tracking upload progress at the moment. I've also looked at https://github.com/developit/redaxios but I'm not sure if and how easy it might be used with Inertia.
So, ultimately this discussion is another pitch to ditch XHR for Fetch. Maybe it is possible to use the Fetch API for all requests except uploads and fall back to XHR for those.
In any case, thank you for maintaining Inertia, I really appreciate your work!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Progressive Web Apps (PWAs) utilize Service Workers which may be used to implement offline functionality for apps. This however only works for requests performed with the native Fetch API (see 1 and the
Exposed
attribute in the spec 2).Since Inertia comes with Axios (and therefore uses XHR) it seems impossible to achieve offline functionality right now.
I'm aware of several closed PRs (#91, #29, #19) and the fact that the Fetch API does not support tracking upload progress at the moment. I've also looked at https://github.com/developit/redaxios but I'm not sure if and how easy it might be used with Inertia.
So, ultimately this discussion is another pitch to ditch XHR for Fetch. Maybe it is possible to use the Fetch API for all requests except uploads and fall back to XHR for those.
In any case, thank you for maintaining Inertia, I really appreciate your work!
Beta Was this translation helpful? Give feedback.
All reactions