Pre-loader

Is there any way to create a preloader of pages, ever I switch from page to page? (Preloading only ends when the page is loadeder)