Java – Refresh only specific parts/elements of the website

Refresh only specific parts/elements of the website… here is a solution to the problem.

Refresh only specific parts/elements of the website

I’m trying to receive some data from a website that refreshes every second.
I’ve been thinking about using meta tags, but somehow none on the site.

I’ve been thinking about timers and handlers, but I have to refresh the entire site to receive updated data at the top of the html document. This results in a lot of traffic.

Is there a way to refresh only part of the page, or even only one element of the page? If so, what to do? Currently I’m using jsoup to get data from a document.

Solution

If the website is not under your responsibility and does not provide any API or URL for getting only the part of the page that interests you, then you have no choice: the web page must be completely reloaded. This is how the network works.

Related Problems and Solutions