Internet connection code using html5 [duplicate] - javascript

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Will HTML5 allow web apps to make peer-to-peer HTTP connections?
I want to make a Internet connection from one device to another how to do the coding of it using html5 and javascript

You can't - at least not directly.
Not only does JS not include any suitable APIs, but things like NAT devices tend to get in the way of device-to-device connections.
Possible work arounds include having both devices make a connection to a central server, perhaps using WebSockets.

Related

Best ways to detect what kind of bandwidth the user has? [duplicate]

This question already has answers here:
How to detect internet speed in JavaScript?
(12 answers)
Closed 5 years ago.
I'm trying to optimize my application experience based on the kind of bandwidth the user has. For example, if the user is on a really slow 2G connection, I would render fewer graphics and less content, for high speed connections, I would include video, animations, etc.
Are there JS libraries that allow you to do this? What's the best practice?
Even if you get the connection type for a user you will not be able to guarantee that is working as expected.
I suggest to explore
Navigation timing API to implement a guess of the client's current download speed.
This blog also have good ideas around that.

Can we detect network type using browser javascript code [duplicate]

This question already has answers here:
How do I check connection type (WiFi/LAN/WWAN) using HTML5/JavaScript?
(4 answers)
Closed 8 years ago.
Is there a way to enforce browser or web page to use 3G network ( not Wi-Fi ). I don't want to use any native code, I have to do this in JavaScript code.
It's not so simple at the moment. The browser would have to give out that information. Firefox started recently an experimental feature which allows this via the navigator DOM object, but it's the only browser that supports it so far.
Check out navigator.connection.

Can Javascript be used for back end? [duplicate]

This question already has answers here:
Serverside and clientside javascript
(4 answers)
Closed 9 years ago.
I read this article that says that PayPal may leave Java and go with JavaScript. I was amazed of this, does this mean that JavaScript can be used as a server side language like Python, PHP, etc? What I know about JavaScript is that it is a client side language.
Use Node.js
http://nodejs.org/
Node.js is a platform built on Chrome's JavaScript runtime for easily
building fast, scalable network applications. Node.js uses an
event-driven, non-blocking I/O model that makes it lightweight and
efficient, perfect for data-intensive real-time applications that run
across distributed devices.
Current Version: v0.10.23

is it too early to use the websockets? [duplicate]

This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
WebSocket for HTML5
Hello,
I would like to use http://dev.w3.org/html5/websockets/
can I start or is it too early and no browser support it yet
Thank you
At the present time you can use something like socket.io library to provide fallback for browsers which don't support WebSocket functionality. Flash sockets or long polling will be used instead.

Bookmarks API on Internet Explorer [duplicate]

This question already has answers here:
Can you access a client's bookmarks using javascript with their permission?
(5 answers)
Closed 4 years ago.
Is there any API on Internet Explorer to retrieve the users' bookmarks with javascript ?
thanks,
Bruno
No. That would be a huge security hole. You could do it with ActiveX if you are, for example, working in a corporate intranet environment on IE, or with an extension if you are targeting a specific browser (such as Firefox or Chrome).
EDIT Reviewing your other questions, I realise you are asking if there is a way of doing it specifically for IE, with the user's permission. You could write an ActiveX control which get's the information for you. See http://www.codeproject.com/KB/shell/iefavorites.aspx for an example. I don't know of a way to do it through JavaScript directly though.

Categories