# Refresh button on "You were logged out." pop up goes to home instead

**URL:** https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596
**Category:** UX
**Created:** [April 28, 2020, 2:00pm UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596 "2020-04-28T14:00:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![fowl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fowl/32/77493_2.png) [@fowl](https://meta.discourse.org/u/fowl)
#### Post date: [April 28, 2020, 2:00pm UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596/1 "2020-04-28T14:00:55Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/1/8/18a0963ba9ff38abe039198b81c9c0a00eaf170a.png)

Steps:

1. Log in
2. Open another tab of Discourse
3. Log out
4. Switch to the other tab to see the above message
5. Click “refresh”

Actual result:

1. Redirected to [https://meta.discourse.org](https://meta.discourse.org)

Expected results:

1. Page is refreshed =)

Browser: Firefox 76.0b8

(Also, it seems only the github login only works on the second attempt?)

---

<div class="post-metadata">

### Author: ![fowl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fowl/32/77493_2.png) [@fowl](https://meta.discourse.org/u/fowl)
#### Post date: [April 28, 2020, 2:09pm UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596/2 "2020-04-28T14:09:53Z")

</div>

Relevant code seems to be:

> <https://github.com/discourse/discourse/blob/84be92c0671b85ce9ba016b4e867784f7022e5f8/app/assets/javascripts/discourse/app/initializers/logout.js#L25>

and

> <https://github.com/discourse/discourse/blob/84be92c0671b85ce9ba016b4e867784f7022e5f8/app/assets/javascripts/discourse/app/lib/logout.js#L30>

Reference to `logout` function could just be replaced with replaced with `window.location.reload`?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [April 28, 2020, 2:12pm UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596/3 "2020-04-28T14:12:31Z")

</div>

Behavior here isn’t great, refresh should, well, refresh, not “go home”. That said, I wonder if the implementation is correct, and the button is labeled wrong. If we don’t send people home, refreshing may result in 404 errors, if the page they were on was a PM, secure category, login\_required site, etc.

---

<div class="post-metadata">

### Author: ![fowl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fowl/32/77493_2.png) [@fowl](https://meta.discourse.org/u/fowl)
#### Post date: [April 28, 2020, 2:17pm UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596/4 "2020-04-28T14:17:01Z")

</div>

That’s true, although in my case I was reading a bunch of public threads.

Also I guess it may be an issue that if the page was private, in that the that private content is still kinda visible behind the dialog before the button is clicked - so perhaps the page should refresh immediately?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 29, 2020, 3:35am UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596/5 "2020-04-29T03:35:28Z")

</div>

This is certainly by design.

The client has no way of knowing if the topic you were looking is public or not, we could carry a lot of logic here to allow for this, but the way I see it being logged out is a **super rare** condition and in such a condition it should be thought as a “reset button”.

A “reset button” should take you back to home.

I guess I support changing the label here but I am not sure what we would call it “Refresh to Home Page” is just too long.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 29, 2020, 3:56am UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596/6 "2020-04-29T03:56:43Z")

</div>

I guess change “Refresh” to “Home” then we can close this topic as complete @jomaxro?

---

<div class="post-metadata">

### Author: ![fowl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fowl/32/77493_2.png) [@fowl](https://meta.discourse.org/u/fowl)
#### Post date: [April 29, 2020, 4:24am UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596/7 "2020-04-29T04:24:31Z")

</div>

The browser “refresh” button works well and doesn’t lose my place if it doesn’t have to. =)

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [April 29, 2020, 1:39pm UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596/9 "2020-04-29T13:39:19Z")

</div>

PR is up:  
[https://github.com/discourse/discourse/pull/9584](https://github.com/discourse/discourse/pull/9584)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 29, 2020, 2:37pm UTC](https://meta.discourse.org/t/refresh-button-on-you-were-logged-out-pop-up-goes-to-home-instead/149596/10 "2020-04-29T14:37:14Z")

</div>


