Jump to content

Auto Redirect from landing page after time

Recommended Posts

  • 1 year later...
On 2/27/2020 at 2:05 AM, tuanphan said:

Add to Landing page settings > advanced > Header

<script>
         setTimeout(function(){
            window.location.href = 'https://beaverhero.com';
         }, 5000);
</script>

Hi Tuanphan, thanks for sharing the script, I wonder how I can turn it into 15 minutes instead of 2 seconds, can you help me? Thanks 🙂

Link to comment
12 hours ago, Adrianadazz said:

Hi Tuanphan, thanks for sharing the script, I wonder how I can turn it into 15 minutes instead of 2 seconds, can you help me? Thanks 🙂

Hi. 1000 = 1 second, 5000 = 5 second

Do similar for 15 minutes = 300000

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
16 hours ago, JimBeacham said:

Once this redirect code is in place, how do you make changes.  It still redirects in the builder/editor.  With it set to 5 seconds I don't have time to make a selection to edit anything like extending the time slightly. 

Hi. 1000 = 1 second, 5000 = 5 second

Do similar for 15 minutes = 300000

You can change it to 1000 minutes

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

I understand the math of the delay.  I have added it into the page, and saved the page, making the code active.  It is working.  In fact, it is working so well, it causes the page to redirect within the SquareSpace editor.  How can I get the page to stay open in the editor long enough for me to make a change. 

 

Link to comment
On 8/6/2021 at 12:35 AM, JimBeacham said:

I understand the math of the delay.  I have added it into the page, and saved the page, making the code active.  It is working.  In fact, it is working so well, it causes the page to redirect within the SquareSpace editor.  How can I get the page to stay open in the editor long enough for me to make a change. 

 

Okay. Can you paste the code what you use? We will try tweaking it

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.