0

I am tasked with making the login functionality for a website. Only working on the UI for now. The "forgot password" page asks for the user's email address, sends it to the backend, which then verifies if the email is registered with us, and if yes then sends a link to reset password on the registered email.

Now my question is, should the "forgot password" page open in the same tab as the login page, replacing the login page in the browser window? Or should it open in a new tab beside the login page? The first implementation is what I see everywhere, but the latter allows the user to just close the tab if opened by mistake or if they happen to remember their password. Is their a good reason for doing it the first way?

2
  • Does this answer your question? Forgot Password Inline vs. Separate Page Sep 2, 2022 at 10:07
  • @greenforest that question is not the same, it's actually the exact opposite: open a div with JS or AJAX instead of going to a new page in the same tab. Also it is very old (9 years) and has no accepted answers
    – Devin
    Sep 2, 2022 at 20:23

2 Answers 2

2

One likely reason is — it prevents users from triggering two conflicting workflows at the same time, namely:

  1. A change password request
  2. A login request with the old password

Since these are mutually exclusive workflows, development is simplified if we avoid conflict by design.

1

Essbee's answer is correct and basically covers most use cases. So this answer is just to extend his answer and add an additional concern: Accessibility.

Acording to W3C Opening new windows and tabs from a link only when necessary

In general, it is better not to open new windows and tabs since they can be disorienting for people, especially people who have difficulty perceiving visual content.

(please follow the link above to read about the ex eptions to this rule)

According to WebAIM Links to New Windows, Pop-ups, Other Frames, or External Web Sites

The accessibility issue is that some users can get confused with the new windows or tabs. Newer screen readers alert the user when a link opens a new window, though only after the user clicks on the link. Older screen readers do not alert the user at all. Sighted users can see the new window open, but users with cognitive disabilities may have difficulty interpreting what just happened. Then when the try to click on the Back button in the browser, nothing happens, because there is no previous link to go back to in a new window or tab.

(again, follow the link for more details)

Also, a more complete and newer article on general issues by NN/G

Opening Links in New Browser Windows and Tabs

  • More windows or tabs increase the clutter of the user’s information space and require more effort to manage.
  • New windows or tabs can cause disorientation, with users often not realizing that a new window or tab has opened. This problem is exacerbated on mobile, where the old window is never visible.
  • Less-technical users struggle to manage multiple windows and tabs, especially on mobile. (On tablets, where users can have both multiple windows and tabs for the browser, it’s even more confusing.)
  • New windows or tabs prevent the use of the Back button for returning to the previous page and force the user to spend effort to find their way back to the previous content.
  • New windows or tabs are not inclusive for blind or low-vision users — especially when they open outside of the area that's magnified.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.