Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

491
Views
How to auto-refresh a web page, even if server returned an error?

I have an HTML+JS web page, which uses http-equiv="refresh" to auto-refresh itself every few seconds. However, sometimes the server returns a 502 "bad gateway" error, so the HTML code is not loaded to the client and thus this auto-refresh does not work any more. However, mnanually refresing the page via F5 in the browser does correctly reload the page.

Now I would like to make this page a bit more robust by allowing itself to refresh, even after a 502 error has been returned. So in other words, the client should try to reload the HTML page after X seconds, in any case.

Is there any way to achieve this kind of auto-refreshing, even if the server does return an error instead of the real HTML page?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found a solution. For the records:

The page content (everything within the <body> tags) has been moved into another page, which is displayed on the main page (wrapper) via an iframe. That wrapper page itself does the reloading via JS.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!