A forum about BlackHat and Beyond

Programming Tutorials

Should i useJavascript or AJAX or something else?

by Nicolas » 2016-01-16 10:22

Hello everyone,

I want to create a very simple web page that has a value (number, for example) from the server and will be updated every second, without reloading the page.

Html side is not a problem, but I am not sure about how to go about having a value of 'dynamic', should I be using Javascript or AJAX or something else?

Server will run on the raspberry pi, so I should be able to install a server-side application that is required to support this.

Could anyone please point me in the right direction, or a piece of code.
Posts: 26
Joined: 2015-12-31 21:17

by Rolando » 2016-01-16 22:07

What is this value, or when it is being taken from?

I'm not sure what the page is doing or how it is setup, but one option is to make data insertion raspberry pi to a database and page flip the database.

AJAX would be fine .. I think jQuery work as well.
Posts: 26
Joined: 2015-01-01 13:29

by Jeremiah » 2016-01-17 10:27

JavaScript is the programming language, AJAX (client-triggered HTTP requests) is a Web API JavaScript. as WebSockets (bidirectional communication client / server (TCP)).

but according to its description WebSockets it is above.
Posts: 24
Joined: 2015-01-04 0:34

by Doyle » 2016-01-18 2:54

If this goes on the internet then you might want to increase 1 second delay between sending update requests, with only 1 second can be easy to hit obstacles and dammed behind many requests are pending. If the local network will not be as much of a problem.
Posts: 25
Joined: 2015-01-04 20:17

Return to Programming Tutorials