lundi 12 avril 2021

Show loading screen on browser refresh

I am trying to replicate the functionality I see on JSFiddler. Basically it shows the loading screen when you hit the refresh button on the browser.

enter image description here

I am showing statuses on a dashboard via some API calls to our internal systems (PRTG, Office 365, Spiceworks etc). Fetching and parsing the data to display properly is taking around 10-15 secs and till that time nothing happens on my screen. I would like to implement something similar to JSFiddler. Please note that the API calls are not via AJAX and I have no intentions of changing it. API calls are happening in my controller using Guzzle.

I tried implementing the basic Show/Hide loading div upon onload but it doesn't seem to be working. My screen remains in the last state for 10 secs and I see the loading div for a millisecond before the whole page loads.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3uJkQq1
via IFTTT

Aucun commentaire:

Enregistrer un commentaire