how to add a progress bar animation before the page loads?

how to add a progress bar animation before the page loads?

is there any plugins or have to do custom code development??