Javascript CDN Loading Issues - Changed to Google CDN


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? Javascript CDN Loading Issues - Changed to Google CDN
# 1  
Old 08-02-2018
Javascript CDN Loading Issues - Changed to Google CDN

Yesterday a couple of people on the West Coast of the US reported some issues loading the home page, and in particular it seemed like parts of the site was blocked from loading because of some networking issues.

In order to hopefully fix this issue, I have changed a couple of our Javascript libraries to load from the Google CDN, in particular:

Code:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/yui/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js?v=387"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/yui/2.9.0/build/connection/connection-min.js?v=387"></script>

The two YUI libs were served from Yahoo's CDN, but this seems to cause problems compared to serving the same from Google.

If you see any more blocking issues, please let us know.

I think the problem is solved, because I tested both the Yahoo libs and the Google libs and the Google libs seem to load faster without any issues; however, we experienced an issue on the West Coast of the US, so perhaps Yahoo had a problem with their CDN.

Actually, I would like to move completely off these old Yahoo YUI JS libs, but that would mean I would have to rewrite a lot of legacy JS code to work with JQuery instead of YUI; and it's not a priority.

If anyone wants to take this huge project on, please let me know! Smilie

Anyway, I'm not convinced this was the problem for our West Coast users yesterday, because normally these Javascript libs are cached in memory, so even if the network is having problem, the libs should load from memory (or disk cache).
Javascript CDN Loading Issues - Changed to Google CDN-screen-shot-2018-08-02-124110-pmpng
# 2  
Old 08-02-2018
Also, please note, as I improve the site, I have slowly been moving JS libs to the footers when possible, so the page will load even faster.

However, a number of JS libs cannot be moved to the footer (for example the YUI and jQuery libs). I did manage to move the swiper.js libs (for the attachment swiper) a and Google Analytics nd a few other libs to the bottom of the page, as well as some of my custom JS.

The pages are loading really fast (for members who do not get served any ads).
This User Gave Thanks to Neo For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question