Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use a background color for the screen between pages

I'm working on a project where my client asked me if I could eliminate the white flash, shown while switching pages. Now obviously this seems fairly impossible, since this is just the transition between two pages.

Normally I'd use AJAX to solve this problem, however, I'm working in an existing Wordpress codebase, and I'd like to use the most simple solution, so preferably something like making it look like the loading screen is e.g. black by loading the background color first, before the rest of the stuff on the page.

Is this a possibility, and if it is, does anyone know how to do so?

Thanks.

like image 719
sushibrain Avatar asked Nov 18 '25 12:11

sushibrain


1 Answers

You have to build your website like a one-page app.

You create a layout page with your theme and you load your page content in ajax. In this way, there won't be any reloading.

like image 84
Antoine Dewaele Avatar answered Nov 21 '25 01:11

Antoine Dewaele