What is the best approach and status code for temporary maintenance pages?

What would be the best practice approach and most desirable HTTP status code for website / application pages that should not be displayed temporarily?

Describe possible alternatives -

  • Leave the user in the current URL, but return a different status code and the contents of the “service”? Maybe 503 codes? SO question - The correct status code for redirecting the maintenance page
  • Redirect from URL to a specific service page - code 302 or 307?
  • Add temporary routing i.e. mod_rewrite, direct request to the temporary maintenance page?

Also, with regard to caching and expiration, would it be better to set the header to the no-cache date or past expiration date if there is an expected time line in the maintenance window?

+3
source share
1 answer

The first option is almost certainly the best. It seems the most appropriate title seems Retry-after.

+1
source

Source: https://habr.com/ru/post/1764818/


All Articles