Welcome Guest, Not a member yet? Register   Sign In
Display Loading Image While Page Loads
#7

(09-18-2018, 05:39 AM)php_rocs Wrote: ...OR...you could create a view that does the work for you and all you would have to do is call the view.

Depends.

If controller/model is slow to handle data, pushing any work to view won't work.

Generally speaking you only have 2 options here, 1) improve your code so that single request to controller gets result in acceptable time (there are few ways to achieve this) or 2) load generic view with loader, and get AJAX to load slow-loading request behind the scenes with at least some visual aid to visitor that site is still working on the request.

Browser needs to load all the HTML to function properly, so even if you manage somehow display part of HTML, the whole document itself keeps loading, I'd say it's very unreliable way to do it, I had to learn that the hard way.

Unless by view, you meant AJAX/JS, in which case... I agree Shy
Reply


Messages In This Thread
RE: Display Loading Image While Page Loads - by Pertti - 09-18-2018, 06:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB