Questions tagged as 'html5'

2
answers

Form validation in HTML5

I'm doing a validation form using HTML5 and its own tags to validate the fields. I'm using the PATTERN , which limits the character type. But it does not work ... Fields are not being blocked. "Code", only numbers and "Name", only letters. C...
asked by 06.03.2015 / 18:12
2
answers

Voice connection between two points

I would like to study about, read how it is done and all possible details about making voice calls between two points A and B It also works these links between users like viber, WhatsApp, facebook provide. Is it possible to use PHP HTML5 J...
asked by 17.02.2015 / 03:49
1
answer

What is parse, and how DOM parse works in HTML5

I started to study CSS3 in depth, and I ended up wanting to better understand how HTML rendering works in the Document Object Model (DOM), and how to do this joining of HTML and CSS (and JS) style tags in the browser . I've read a lot, but he...
asked by 21.11.2015 / 19:14
3
answers

Automatic calculation in text box

Good morning. Is there any way for the user to type this in a text box: Does a script run the account automatically and result, in this case, = 1? It is also important that he do this with all operations and that it is in pure javascript....
asked by 02.08.2014 / 16:55
1
answer

Why do you use the history.pushState function?

I noticed that the history object has some relation to browser history manipulation. There are methods like go and back which are more understandable, but I do not quite understand what the pushState does. What is...
asked by 16.10.2017 / 15:33
2
answers

Use "left: -9999px" instead of "display: none"? But why?

I began to wonder about this subject a short time ago. I read in some article, which I can not remember what it is, that by "visibility issue" instead of using display: none or visibility: hidden should be used left: -9999px...
asked by 21.11.2017 / 18:03
2
answers

What is the difference between Meter and Progress in HTML5?

What's the difference between these two html tags, only the appearance (layout, color) is different? <meter min="0" max="100" value="22"></meter> <progress value="22" max="100"> </progress> What's the difference bet...
asked by 24.04.2014 / 18:01
1
answer

EaselJS isometric map, problem in code, can identify

window.onload = function() { var stage = new createjs.Stage("canvas"); var bmp; var board; var img; var data; var tileClone; var x,y; var mapWidth; var mapHeight; img = new createjs.SpriteSheet({ "images": ["images/tiles.png"], "frames...
asked by 01.05.2014 / 22:06
2
answers

CSS: color opacity through hexadecimal?

I accidentally put a hexadecimal color with two more digits and I noticed that in Google Chrome this affects the opacity of the color, as well as the rgba() function. More or less like this: body { background-color: #ff0000;...
asked by 22.11.2018 / 20:02
2
answers

___ ___ erkimt What are the data transfer forms available to JavaScript? ______ qstntxt ___

It is common to find questions, answers and tutorials talking about AJAX, which is nothing more than %code% , as a way of transferring data between two computers.

I would like to know if there are other forms , whether standard or proprietary, limited in some condition or open to any user and site. An example of a limited form, if any, would be an API restricted to extensions.

In particular, but not restricting, I'm looking for a way to transfer data - something between 10 and 30 bytes - in the fastest way possible between two computers within the same network. Peer-to-Peer would be ideal, but I do not know if JS supports it. I have already tried testing services such as Firebase , which allowed a minimum response time, however, using a server out of network and with occasional loss of data.

Knowing other ways I wanted to find one that would fit better with what I'm developing. It does not look like the answer will be anything big: the options seem to be quite limited, since it looks like only AJAX is used.

    
______ azszpr8188 ___

There are several APIs that will allow you to transport data via Javascript.

Some will only allow you to receive data, others will allow you to send and receive.

The ones that allow you to send and receive data are:

  • %code%
    • Requests via HTTP protocol
  • %code%
    • It is a cross-compatible HTTP protocol focused on message exchanges lighter and faster than request, but it does not have a state resolution as efficient as %code%
    • W3C Specification
  • %code%
    • Peer-to-peer data exchange protocol was created to solve the problem of video and audio transmissions between browsers.
    • W3C Specification

If the data transmission needs to be p2p, the ideal is to use WebRTC, but it is still rather complex to create a server that will make the handshake between two browsers and start communication.

A simpler solution is to use WebSockets , but all information will go through a server that will receive data from one client and send it to another or other clients. But the websocket has the constraint of working with UTF-8, however it is possible to use data converters to convert binary data to UTF-8 before being transmitted and back to the original format when received, there are several ways, one of them is using the %code% .

    
______ azszpr8194 ___

I suggest using Socket IO, a javascript extension already adapted for use in cross-browser and that has an extra advantage, it chooses the most efficient way to carry data between the technologies below (which are the answer to your question) :

1) WebSocket;
2) Adobe Flash Socket;
3) AJAX long polling;
4) AJAX multipart streaming;
5) Forever iframe;
6) JSONP Polling.

Still, this extension has excellent compatibility: IE 5.5+; Safari 3+; Chrome 4+; Firefox 3+; Opera 10.61+; Iphone / Ipad Safari; Android Webkit and Webkits Webkit.

link

I have had excellent experiences with this extension. When you opt for a path where fallbacks are already included, everything gets easier!

Good Luck!

    
___

It is common to find questions, answers and tutorials talking about AJAX, which is nothing more than XMLHttpRequest , as a way of transferring data between two computers. I would like to know if there are other forms , whether standard...
asked by 06.03.2014 / 01:30