inTempo Posted April 27, 2021 Share Posted April 27, 2021 (edited) So, im messing around with my site to try make it load faster, and i noticed when i use the direct link to a language selection vs having the language hook i use find it, the load speed decreases significant.. Im using this code for language redirect (look picture as this community is broken with post code!) And it works fine, but look at included screenshot from GTMatrix (i did this many times to make sure), the load time for this one thing is crazy. Anyone know a trick or fix to speed this up? Thanks 🙂 Edited April 27, 2021 by inTempo code 0 Quote Link to comment Share on other sites More sharing options...
inTempo Posted April 30, 2021 Author Share Posted April 30, 2021 nevermind, found a way using combined htaccess and the script 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted April 30, 2021 Share Posted April 30, 2021 The reason why it loads slowly is that ClientAreaPage triggers when WHMCS has already initialized most classes and functions. That's why for example the $vars is not empty and can be used in the hook. In essence when you use header location inside ClientAreaPage, you are effectively loading two pages at once. The one where the user lands and the target of your redirect. You don't notice the first load just because there's no output but WHMCS has already autoloaded a ton of classes. With .htaccess you avoid the redirect bottleneck. 1 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.