Newbie - How do I use the cake framework to display loading spinner image on page loads?


I am trying to figure out an approach to displaying a loading spinner before each page load. Maybe this is not the best approach I am not sure. I have a spinner class already created, I just want to understand how to best show and hide the spinner class on each page load? Maybe just to start how would I do it in one of my views and then worry about common code later. Thanks in advance !



Is this just simple javascript in my case using the events from Javascript?


CakePHP is mainly residing on the server-side, what you want to do resides on the client-side so you should use Javascript for this.

There are loads of tutorials on how to do this with Javascript.