Giter Club home page Giter Club logo

Comments (13)

JavaTheNutt avatar JavaTheNutt commented on May 22, 2024 3

@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.

Naramsim avatar Naramsim commented on May 22, 2024

Are you browsing Google.com.br or your webapp?

from pwa.

rof20004 avatar rof20004 commented on May 22, 2024

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.

Naramsim avatar Naramsim commented on May 22, 2024

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.

rof20004 avatar rof20004 commented on May 22, 2024

But if I test with a mobile? I only can access using my IP address.

from pwa.

rof20004 avatar rof20004 commented on May 22, 2024

If I remove this line in condition it will work?
(window.location.protocol === 'https:' || isLocalhost)

I will test here

from pwa.

rof20004 avatar rof20004 commented on May 22, 2024

I tried and not worked, I need HTTPS?

from pwa.

rof20004 avatar rof20004 commented on May 22, 2024

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.

addyosmani avatar addyosmani commented on May 22, 2024

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.

rof20004 avatar rof20004 commented on May 22, 2024

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.

eMerzh avatar eMerzh commented on May 22, 2024

@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.

hathemi avatar hathemi commented on May 22, 2024

is there a solution ???

from pwa.

rof20004 avatar rof20004 commented on May 22, 2024

@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:

  1. PWA only works with https.
  2. service-worker.js needs no cache.

Regards.

from pwa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.