<\/figure>\nI’d give us a C- here. At least you know what’s going on and you don’t lose any work, but, from here on out it’s awkward. You’ll have to log in on another tab, and probably copy and paste code elsewhere to save it, as the “dead tab” can’t get un-dead unless you refresh it. <\/p>\n
If we were gunning for an A, we’d allow you to log in on that page without refreshing somehow, and make sure any unsaved changed get saved after the successful login. And with an unsuccessful login, still make sure you get a copy of unsaved work somehow. We might call that…<\/p>\n
Stay where you are, warn proactively.<\/h4>\n Perhaps messaging like: “You’ve been logged out. You can log back in here.”<\/p>\n
To know this, the front end of your site needs to know about the log in status either periodically or in real time. For example, a server-ping every X seconds to check that status and if you’ve become logged out, show the message (without requiring any other action). Or perhaps a more modern websocket connection that could push the logging out messaging as it happens.<\/p>\n
If you can wire that up to all happen on any page of the site, not require changing pages to fix it, and never lose any unsaved work, that’s pretty ideal.<\/p>\n
The truly dead tab<\/h4>\n The worst case scenario is when the tab has died, and there is no path to recovery. It doesn’t tell you it’s dead, leaving the page could result in unsaved work or actions, and there is no warning or recovery steps. <\/p>\n
Have you seen great UX for this?<\/h3>\n This is a major issue in that it affects every single site you can log into. It’s both suprising that there isn’t more talk and best practices surrounding this, and that there aren’t some stand-out sites that handle this particularly awesome to shout out. <\/p>\n
Do you know of some particularly good (or bad) examples?<\/p>\n","protected":false},"excerpt":{"rendered":"
Do we need a word for when a browser tab has sat too long and you just don’t trust thing are going to work as you expect them do when you come back? I tweeted that the other day and apparently other people had them feels.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[4],"tags":[],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"featured_media_src_url":null,"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/263963"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=263963"}],"version-history":[{"count":2,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/263963\/revisions"}],"predecessor-version":[{"id":263970,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/263963\/revisions\/263970"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=263963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=263963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=263963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}