How to PreLoad Wordpress Page Before Rendering?

...and have a simple "loading" graphic display while the page loads?

Any simple javascript and/or css I can put in my head injection plugin that will do this?

So far all the options I've tried online haven't worked?

  • mort3n
    • The Crimson Coder

    Hi magi,

    I've taken the cache approach to this, i.e. reduce load times, put JS in the footer etc. That way I find a preload is often not needed.

    However, I can imagine situations where preload is needed. You don't mention which solutions you have tried, so maybe this is one of them. The WP plugin repository has a number of plugins trying to solve this. One of them is

    This should allow you to show a preload screen while preloading the actual page.

    Hope this helps :slight_smile:


  • magi
    • Design Lord, Child of Thor

    The problem isn't images. The problem is a long form. The form is set to autohide questions and display them 2 at a time.

    When the webpage first loads all the form questions display. When the form is finally fully loaded all but the first questions disappears (as it should).

    Problem is this is going to through off the user.

    All I ever want the user to see is not more then 2 questions at a time.

    Preloading images won't work. Moving JS won't either. I need something that is going to pre-load the form before showing it.

    The form is in PHP generated by a the formidable plugin.

  • mort3n
    • The Crimson Coder

    Hi magi,

    Thanks for clarifying :slight_smile:

    First, did you ask the people over at Formidable for ways to solve this? It seems like an issue many of their users could encounter.

    Second, is the form the same in all cases or is it set up for each specific user?

    There are probably several ways to approach this.

    Perhaps you could use CSS (not my strong side :slight_smile: ) to not show the form components until the page has loaded. Here's a thread that discusses ways to achieve this :

    An alternative is to use caching. There are several quite good cache plugins on the WP plugin repository. Each have strong and weak sides, investigate which one is more suitable for your site. Here is one I use

    If the form is essentially static, ie. it doesn't change between users, then perhaps try to store it as a transient. Some cache plugins (memcached ones) will store transients in RAM. For the full WP story of transients, see the Codex

    Hope this helps :slight_smile:


  • Tom Eagles
    • Syntax Hero

    Hiya, just going through some of my outstanding threads here.

    As it's been a little while since we last heard from you I thought I'd check in to see how you're going?

    If you're still looking for some further assistance with this thread then please feel free to reopen the thread or of course for any new and related issues you are most welcome to open a new thread.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.