If condition before page loading?

i wondered if it’s possible to write an if condition and only if it’s true, the page content loads.

Thanks for your help,

I’ve done it using strips. i hid the strips onLoad then make an if statement on the onReady function then if the result is true .show the strip. You can also use a container box,. put all your elements on that box then hid on load and show after if statement result is true.