U
U
Umid2017-02-26 13:19:56
JavaScript
Umid, 2017-02-26 13:19:56

How can JavaScript determine the user's internet speed?

Good afternoon.
I came up with the idea to write SPA in such a way that if the user has a very good connection speed (and not only, there will be many similar conditions), then issue a version of the site in 3d format (three.js or babylonjs), otherwise a normal static site.
At the moment, there is no high knowledge in nodejs.
But I really want to write backend on it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2017-02-26
@DarCKoder

https://developer.mozilla.org/en-US/docs/Web/API/N...
but there is no good way
Better and easier to ask the user if he wants to get everything or not
You can attach a video with the result before uploading Total

G
grinat, 2017-11-09
@grinat

What version of angular? So there is a built-in validator. If it is not needed, then when processing the send event, write validation errors to a certain variable, and in the template:

<div *ngIf="validationErrors.myField">{{validationErrors.myField}}</div>
, in angular, which js is true, there may be problems with this option, due to the fact that variables in objects are not reactive, so it’s better to do this there:
<div *ngIf="hasValidationError">{{validationErrors.myField}}</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question