Code Monkey home page Code Monkey logo

Comments (16)

lutfishah avatar lutfishah commented on July 28, 2024 1

Hi Zack, Thanks for sharing your amazing work. Hope this could be a quick fix. I have made offline.js work on my computer. The only issue (or maybe I've got the wrong end of the stick) that when I disconnect the Internet, the indicator shows that the internet connection is lost. But at the same time if I refresh the page the indicator goes back to green whereas I'm not connected to internet. At the same time if the indicator is red and I switch the wireless on, the indicator does not get any signal maybe and stays red until I refresh the page. Could you please help. Many Thanks in advance.

from offline.

robertop87 avatar robertop87 commented on July 28, 2024 1

Same issue here:
When my whole computer and of course the app is offline, then the Offline.status is "up".
Browser: 60.0.3112.101 (Official Build) (64-bit)
OfflineJS version: ^0.7.18

from offline.

zackbloom avatar zackbloom commented on July 28, 2024

Offline detects when your user doesn't have an internet connection, not when your server is down. Messenger can help.

from offline.

gbin1 avatar gbin1 commented on July 28, 2024

what about i deploy the server to internet? should it work again?

from offline.

zackbloom avatar zackbloom commented on July 28, 2024

Offline doesn't care if your server is up or not, only if the user has an internet connection. Wrapping your requests with messenger, as I suggested above, will allow you to easily show traditional error messages.

from offline.

DilipRajkumar avatar DilipRajkumar commented on July 28, 2024

I dont have internet and I try to execute Offline.state I get 'up' Also if I try Offline.check() it gives me some json output. How to find if the internet is down?

from offline.

zackbloom avatar zackbloom commented on July 28, 2024

What browser?

from offline.

DilipRajkumar avatar DilipRajkumar commented on July 28, 2024

I think I figured out the issue, I was doing offline mode in FF. And I was trying in my local site. I will move to web environment and try it. Will keep you posted. Thanks for the quick response.

from offline.

vinay-kotian avatar vinay-kotian commented on July 28, 2024

Hello,

I am using offline.js in my web application. When the connection goes down or offline, the pop up does come up but I cannot see the text. I have tried my best to find what I am missing. Am I missing some js or css files which need to be included.

from offline.

zackbloom avatar zackbloom commented on July 28, 2024

@vinay-kotian Please be sure you're including both a theme and a language file: https://github.com/HubSpot/offline/tree/master/themes

from offline.

mahanandajreddy avatar mahanandajreddy commented on July 28, 2024
I am using Offline.js to show a message when internet is not there, its working fine but in sometimes Firefox 44.0 version when internet is not there than it will show alert "Your device lost internet connection" and "Attempting to reconnect" and than without internet also it will come third alert message as "Your device is connected to the internet" and alert will disappear.

can anyone suggest me how to fix this issue is Firefox and some times this issue will come in chrome also.

from offline.

hardikmodi1 avatar hardikmodi1 commented on July 28, 2024

Does offline.js work in localhost or I need to move to web environment?

from offline.

pratikhmehta avatar pratikhmehta commented on July 28, 2024

Hello,

I am using offline.js in my web application. When I do offline in Google Chrom Network Tab -> Offline then it works fine, but it not able to work while I turn off my wifi.

Please help me
Thanks,

from offline.

robertop87 avatar robertop87 commented on July 28, 2024

@pratikhmehta perhaps my guesses this time are stupid, anyway those are the next:

  1. I think you are pointing to localhost, then does not matter if you turn off your wifi, the offline.js keeps "online" for localhost.
  2. I think you have the n/w cable still connected.

Maybe I'm absolutely wrong, I hope that.

Regards.

from offline.

ashah7 avatar ashah7 commented on July 28, 2024

Is there a way to check Internet connection if on localhost? Using offline.js

from offline.

zackbloom avatar zackbloom commented on July 28, 2024

Yep, just change the URL to something which is on the internet. See https://github.com/HubSpot/offline#checking.

from offline.

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.