A forum about BlackHat and Beyond

Web Development

Tips To Update Webpage Value From Server

by Randy » 2016-02-06 10:13

Hello, all,

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 someone please point me in the right direction, or a piece of code.

Thank you very much
Posts: 75
Joined: 2012-04-01 22:28

by Marco » 2016-02-06 23:03

What core values or where it was pulled from?
I'm not sure what the page is doing or how it's setup, but one option is to have the data raspberry pi urge to pull pages from the database and the database.
AJAX will be fine .. I believe jquery will work fine.
Posts: 95
Joined: 2011-04-01 19:12

by Brandon » 2016-02-07 8:43

JavaScript is a programming language, AJAX (httpclient-triggered demand) is the Web API JavaScript. like WebSockets (client / server (TCP) two-way communication).
but according to your description WebSockets overhead.
Posts: 58
Joined: 2012-12-07 9:42

by Herman » 2016-02-07 23:29

This can also be done via the web sockets. after all, the change comes from the server side and you just need to update the client if there is a change.
Posts: 65
Joined: 2012-06-04 9:06

by Garry » 2016-02-08 15:15

If it 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: 77
Joined: 2011-08-05 9:06

Return to Web Development