Landing page showing based on cookie

I’m thinking of creating a separate landing page for my website.

I would like the landing page to show when viewers arrive for the first time. Then, if they have been to the site before the browser will automatically skip the landing page and take them directly to the homepage.

How would I go about doing this?

Thanks in advance.

Kindly,
Amanda

Hi,

Would you consider not having 2 different pages but one unique home and a DIV that would cover it,n that you’d show based on a cookie? This way, the SEO of your unique Home is much easier to handle and the results are way, way better.

So a cookie is set either with PHP or JS, in our case, Webflow only uses JS. Here’s a possible approach:

http://stackoverflow.com/questions/21587098/jquery-cookie-hide-show-div

That is absolutely interesting.
It sounds terrific if I can make it work :slight_smile:

You mean I’d make a div block that covers the entire page?
Not too sure where to put it and how to make it not affect everything else on the page, also appear/disappear.
But I guess that part is controlled by the code I’d have to put in?
Also, where am I to put in the cookie-code? In the settings for the homepage?

And to be able to edit the stuff behind the div, I’ll just hide it for the moment?

Also not 100% sure about the code, it’s gonna work with webflow?

Thanks Vincent, as always :slight_smile:

Sort of, but I don’t know exactly your goal…

Technically that’s easy: create a div just under the body, give it position:fixed and width 100vw and height 100vh (and possibly a higher z-index). You now have a div covering everything else and not affecting it. I mean you can only see this div, until you pass it display:none.

Yes

I have to try it for myself if I want to guide you better, will be able to try that tonight or tomorrow.

Thank you Vincent!
That’s what I meant, something covering the homepage entierly, to make it look like an entierly different page.

That makes perfect sense, no need for further guiding :slight_smile:

I’m gonna try it in a new site and see if it works!

The thing I’m not sure about is the coding…
I’m gonna have to arrange for a live test-domain to try it and see how it works!
Can’t be that hard!

//A

Hi again,

I wanted to do that for a long time, so here is a little template that is showing exactly what we talked about:

You can clone the site to check how it’s made:

Hope this helps :slight_smile:

2 Likes

This is great Vincent, thanks! :slight_smile:

Glad you had this on the list “anyway”.

I’ll experiment a little and see how it works, I’ll write again if I run into problems :slight_smile:

//Amanda

Heureka! It works! :raised_hands:

1 Like

Double moonwalk dance!

1 Like

:two: :x: :full_moon::walking::dancer:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.