Kian Posted August 29, 2019 Share Posted August 29, 2019 (edited) I can't say that this is a bug but for sure it's something that should be looked into since it can hugely increase page loading times. Every time WHMCS can't load a file it triggers a 404 which is perfectly normal. The problem is that every 404 loads the entire website (header, navbar, sidebar, body, footer and all the related action hooks) just to display the "Oops, page not found". Let me show how this could lead to severe issues. In the example below I have intentionally removed 5 images from a module that I'm creating so that WHMCS triggers six 404 (5x for images 1x favicon.ico). The website finished loading in 184ms but missing files increased this value up to 7173ms (+3800%) just because I removed 6 images. As I said earlier, the reason is that each 404 loads clientarea page. In other words on every page load you'll load clientarea 6 times because of missing files even when you're browsing the admin interface of WHMCS. Of course missing files should be fixed upfront but handling 404 in this way in my opinion is inefficient especially because the only purpose is to display the beautiful "Oops, page not found" page. I want to underline that Firefox always requests favicon.ico file on every page view (that was a design decision). As we all know WHMCS doesn't have a favicon.ico file therefore every time we load a page WHMCS "secretly" loads clientarea (hooks, navbar, sidebar, body...) increasing loading times for no reason even if you have no missing files at all. Edited August 29, 2019 by Kian 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.