• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

check if online

Enthusiast ,
Sep 03, 2012 Sep 03, 2012

Copy link to clipboard

Copied

Hi,

I'm not as close to network, networkprotocolls and co.

question:

Will this be a safe way to check if a user is 'online' (connected to the internet by wlan or lan or ...)

var myConnection = new Socket();

if(myConnection.open ("www.google.de:80")) {myConnection.close();}else{alert('Not connected.')}

TOPICS
Scripting

Views

901

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Sep 03, 2012 Sep 03, 2012

sure .. connect to the dropbox URL http://www.dropbox.com oder their API https://api.dropbox.com/ instead of connecting to google

Votes

Translate

Translate
Participant ,
Sep 03, 2012 Sep 03, 2012

Copy link to clipboard

Copied

Hi,

  • your code definitly works
  • being able to connect to "google.de" is not a save definition of being "online".  Firewalls, Proxies etc can ruin your day. 
  • rather check the connection to the online service you want to connect to (if that is google, forget what I said) .. 

Regards

b.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 03, 2012 Sep 03, 2012

Copy link to clipboard

Copied

hi,

I want to get sure that the dropbox can work ...is there a concrete way to check for connectivity of the dropbox¿

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 03, 2012 Sep 03, 2012

Copy link to clipboard

Copied

sure .. connect to the dropbox URL http://www.dropbox.com oder their API https://api.dropbox.com/ instead of connecting to google

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Sep 03, 2012 Sep 03, 2012

Copy link to clipboard

Copied

LATEST

as easy ¿

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines