Menu

Our welcome screen is covered by a CSS rule that deletes itself after three seconds
📰

Our welcome screen is covered by a CSS rule that deletes itself after three seconds

DEV Community: css·Daniel Pertu·2 days ago
#kf34POpO
#devtocss#devto#dev#welcome#cookie
Reading 0:00
15s threshold

Signing in used to drop you straight onto a dashboard, or onto the game you were trying to play, with no acknowledgement that anything had happened. We wanted a short full-screen welcome: logo, a line of text, a progress bar, gone in a couple of seconds.

The easy version of this is a /welcome page you redirect through. We did not want that, because the redirect we already perform is doing real work. It sends people to the thing they were trying to do before they were asked to sign in, and inserting an interstitial page into that chain means a second navigation, a second chance to lose the destination, and a URL in the history that nobody wants to go back to.

So the welcome plays over the destination instead, and the whole mechanism is one cookie.

A cookie that is read once and then is gone

export const WELCOME_COOKIE = 'cp_welcome' ;

/** `new` for an account created just now, `back` for a returning sign-in.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.