Jump to content

make preloader animation only show once per visit, not every page

Recommended Posts

is there some some script i can add to only make the header appear once on homepage page load per visit, rather than every time on each page? 




code used:



<div class="loading-screen">
  <div class="loading-screen-image"></div>





//pre loader//

//To style the whole screen container
.loading-screen {
  animation: goodbyeScreen .5s forwards 2s cubic-bezier(.5,-.75,.7,2);
  background-color: #2d2d2d;
  height: 100%;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 10000;

//To style the logo or image
.loading-screen-image {
  animation: Scale 1.5s ease-out;
animation-iteration-count: infinite;
-webkit-animation: Scale 1.5s ease-out;
-webkit-animation-iteration-count: infinite;
  background-image: url(https://static1.squarespace.com/static/61aa04c639b60c4711dd2d19/t/66505220e8815a3374a9d2cb/1716539936231/Asset+26.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  height: 40px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;

//Animation for the scrolling logo
@keyframes scrollingLogo {
  to {
    transform: translate(-50%, -50%);

//Animation for the sliding screen
@keyframes goodbyeScreen {
  to {
    transform: translateX(-100%);

@keyframes Scale {
  0%   {transform: scale(1);} /* At 0% of the interval listed in the animation above*/
  50%   {transform: scale(1.1);}
  100%   {transform: scale(1);}

Link to comment
  • Replies 1
  • Views 412
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

8 minutes ago, moonlitdesign said:

is there some some script i can add to only make the header appear once on homepage page load per visit, rather than every time on each page?

See this thread for an overview of what you'll need to do.


About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

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.