-1

I'm creating a website with no JavaScript, and I'm puzzled about how platforms like Dread manage to redirect users (e.g., in a queue system) pending a server response.

Here's what I want to achieve:

  • The user visits a webpage.
  • A loading screen is displayed.
  • The server processes some task, and once it's done, the page refreshes or redirects to a new page.

Initially, I thought this could involve some sort of workaround, like loading an image that "waits" for the server to respond with a Location header for the redirect. However, I'm not sure if that's the right approach.

My Questions:

  • What HTTP headers should I send to achieve this behavior?
  • How is this done entirely with HTML and server-side logic (without any JavaScript)?
  • Are there other techniques or best practices for implementing this?

Thank you for any insights!

Edit: Dread doesnt use a meta-refresh tag, and I dont want the page to periodically refresh - I want it to be asynchronous

1 Answer 1

1

Redirecting after a server response without using JavaScript can be achieved through HTTP headers.By sending a "Location" header with a 3xx status code, the server tells the browser to automatically navigate to a new URL.This method is especially useful for server-side redirections and improves performance by avoiding client-side scripts.

Sign up to request clarification or add additional context in comments.

1 Comment

I know how to redirect using http. I'm asking to process the redirect after the page has been loaded pending a server response

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.