Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8447383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:10:09+00:00 2026-06-10T10:10:09+00:00

Should a POST request render HTML or redirect? I hate it when your on

  • 0

Should a POST request render HTML or redirect?

I hate it when your on a page and refresh and get the browser telling you, you’re going to post data again.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:10:11+00:00Added an answer on June 10, 2026 at 10:10 am

    Yes. It should send an entity or redirect!

    (Sorry, the old programming jokes have to come out sometimes).

    It really depends on whether you can meaningfully give something to GET, that makes sense standing on it’s own.

    Example: I buy something, I get a page saying “thank you, yadda yadda order number, receipt, yadda”.

    That should be a 303 See Other redirect, so that I GET a page with that info. I can bookmark it for later, refreshing just refreshes the GET. Happy days.

    There are times though, when it only makes sense to render an immediate response, and if they refresh, then to repeat the actual operation, and bookmarking is meaningless That should not be a redirect.

    For the most part, aim to have as few of the latter anyway. It is though most useful if you have to return them to the form because something failed – nobody wants a bookmark of a failed form, they want to fix what needs fixing and get on with it.

    Note, many server-side systems (ASP etc) use 302 when you redirect from a POST, which strictly should mean that it POSTs again, but just about no browser does. Instead, be clearer:

    1. If you want to redirect the POST again, so the POST goes to a different URI – well don’t, that has other issues – but if you really really have to, then 307
    2. If you want to follow up a POST with a GET to something explaining the result, the 303. It unambiguously means “now do a GET”.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: PHP detecting request type (GET, POST, PUT or DELETE) This should be
I know you should use POST whenever data will be modified on a public
Mozilla's own specification says simple GET or POST should be natively CORS's without preflighting
After processing form from POST I should redirect, to prevent user from hitting back.
Why would you do an automatic HTML post rather than a simple redirect? Is
I ran into this question today and thought I should post it for the
( I don't know whether should I also post this question to ServerFault, since
guys please post me an example for threading in MFC....it should show the progress
UPDATE: I should have mentioned in the original post that I want to learn
Bill Karwin has a blog post called Why Should You Use An ORM ?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.