So we needed to set an IFRAME loading screen before loading our custom webpage from Sharepoint instead of the blank white page while the sharepoint app pool is starting up.

iframe loading

These are the javascript functions I used: