I have talked about a simple troubleshooting check if a domain name is blocking by MCMC in Malaysia last week. And I would like to share another troubleshooting method related to speed optimization too.
Website Load Extremely Suddenly
If your website working all the way fine, and just encounter extremely slow load when open up your website suddenly, you should not do any speed optimization before found the root cause of it. You will waste your time and end up getting the same result. A website loading speed could be effected by many reasons. One of them is some asset file resources in that particular page not accessible, failed to load or took long time to load. This could be an image, a css file, a js file etc.
Identify Root Cause
First, open a private / incognito browser. Before enter your website link, open up the developer tools (F12 shortcut key). And navigate to Network tab.
Now type in your slow website url and press Enter. At this moment, you should be able to see many requests in the Network tab. Take note if any request without response, keeps pending and end up with timeout or failed error.
You should be able to see your website successfully loaded immediately once the problem url shown up as timeout or failed.
At this point, you could try to right click on the request, copy the url and open it up on a new tab. Test if it’s really unable to load in the new tab. Alternatively, you could right click on the request and choose Block request URL. Then just use Ctrl + F5 to refresh the current problem page. Surprise? Now your webpage speed back to normal right?
To double check if that specific url request is the culprit. Just unblock it at the bottom part of development tool, and use CTRL + F5 to refresh the page again. If your website speed load slow now, then that specific request is the trouble maker.
What To Do Next?
Well, once you identified the culprit that causing your website loading speed slow, just find a way to replace it in your code. Could it be typo? Maybe the resource or server issue on this particular request? It’s all depends on different cases.
But if you are facing the same in my example above, which the culprit request is from maxcdn.bootstrapcdn.com, and you are from Malaysia, then this is due to Malaysia MCMC block. The only solution is replace the source. Do not use this source in your website if your target audience from Malaysia, I am pretty sure your visitor will close the browser after waiting more than 5 seconds.
How to change the problem culprit asset source? I am not able to tell you the exact way as different website got different way, if you know the source code, just replace it will do. But if you are using WordPress, just use Replace Asset Source plugin and follow my guide here.