Comments (13)
@eMerzh Unless you modified your webpack config, offline shouldn't work in dev mode. You don't want assets to be cached while in development.
from pwa.
Are you browsing Google.com.br or your webapp?
from pwa.
No, I get the screenshot in my pc because I do not know how to do this in mobile :D , I only wanna show the image tha appears. I am browsing my app, I used the google.com.br only to take screenshot.
from pwa.
Yep, maybe I've understood the issue, you browsed and are browsing from 10.0.0.1, but currently, this PWA is implemented to be tested only using 127.0.0.1/8 subnet
So you have to browse 127.0.0.1, turn off the Internet and reload, everything should work fine.
from pwa.
But if I test with a mobile? I only can access using my IP address.
from pwa.
If I remove this line in condition it will work?
(window.location.protocol === 'https:' || isLocalhost)
I will test here
from pwa.
I tried and not worked, I need HTTPS?
from pwa.
Well, I tried with https, on port 443, and not worked, I think that have a problem caching files, and in my PC browser always have many errors that can not fetch manifest.json and service-worker.js
from pwa.
You generally need to either be directly running off of localhost (whitelisted) or a domain with HTTPS setup in order for the Service Worker to successfully register.
I'm unsure about the specifics of the setup above, but if you're trying to test on mobile I'd recommend plugging your phone up to your system over USB and using DevTools remote debugging which will let you test your local version with SW correctly: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/
from pwa.
Well, I will waiting for #12 , because it apears to me and i will try again another day, but I think this is strange, I created a PWA that works offline, without vue, and it worked like I expected, doing the same tests here, I did it manually, maybe I miss something using with vue-cli. Thanks and regards everyone.
from pwa.
@addyosmani
sorry to dig up this old issue, but kinda have the same issue, not abble to make offile work...
not sure i do smth wrong...
what i did :
- init the vue pwa app with vue-cli
- add codes
- ran
yarn dev
- then in network panel of devtool set offline
- reload
and it fails
is there smth that i don't get ?
thanks
from pwa.
is there a solution ???
from pwa.
@hathemi Hi, I opened this issue years ago, now the vue-cli works perfect without this problem. May you need to open a new ticket with details of your problem.
My problem was solved doing this:
- PWA only works with https.
- service-worker.js needs no cache.
Regards.
from pwa.
Related Issues (20)
- Suggestion: serviceWorker.register path and routes issue HOT 2
- Offline support when using html5 history api HOT 1
- HELP: VueX and no-param-reassign HOT 3
- Active in Development? HOT 2
- SPA app using angular not working offline for pages other than Index
- Problem when importing firebase-messaging-sw to SW service worker. HOT 2
- Tapable is deprecated in Webpack 4 HOT 4
- offline caching options for pwa HOT 1
- Step missing in installation?
- Cloudflare's Under Attack Mode breaks Service Worker
- how i dynamically change my manifest.json file HOT 1
- How to disable "Add to Homescreen". HOT 1
- Failed to register a ServiceWorker
- Uncaught TypeError: Cannot read property 'call' of undefined
- PWA themeColor is not picking value from manifest.json file HOT 2
- Service Worker Error TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.
- Failed to register a ServiceWorker when app run on network address
- POST API not calling on mobile [Chrome v72.0.*] HOT 1
- Uncaught (in promise) DOMException
- Service Worker is not working as expected in react typescript
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 pwa.