Quiz

  1. In what situations would we want to use redirects in our web apps?

    I can think of a few:

    • After someone logs in, you redirect them to the homepage, profile page, dashboard, or so thing like that.
    • After a search, you redirect them to the primary or intended result. You'll do that in the Lookup assignment.
    • After posting something, you redirect them to a page to edit/update that something. You'll do that in the CRUD assignment.
    • After posting something, you'll redirect them to a confirmation page. This is the POST-redirect-GET pattern which we'll discuss next time.

    In all of these, you are doing the redirect to help the user: there's a better place (endpoint) for them to be.