Support » Theme: Customizr » Ultimate road to optimization: Remove external scrips

  • Hello,

    I’m attempting to optimize my website as much as possible.
    I’ve just run a GTMetrix test with all plugins disabled:
    https://gtmetrix.com/reports/terageek.org/ktHvavXy

    So first off, well played to Customizr devs because it’s pretty well optimized out of the box (once the server is perfectly configured and theme’s performance settings are enabled as well).

    However, I’d love to remove the need for Google stuff to be loaded within the website. This would help with performance and getting a bit less “googlized” and improve the YSlow score that is lowered due to loading external resources:
    https://fonts.googleapis.com/css?family=Source+Sans+Pro
    and https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2

    Also, there’s a JS script that seems quite heavy (cleaning would be welcome if possible) and that blocks page rendering, would better be deferred if possible:
    /customizr/assets/front/js/tc-scripts.min.js?ver=4.1.55

    Is there any chance to see this these features implemented in Customizr ?
    Or do you have any hint to apply (clean) fixes myself for my instances?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author presscustomizr

    (@nikeo)

    Hello, thanks for opening this topic.
    Your website scores well on GTmetrix, congrats.

    You can disable the Google font ( Source sans Pro ) request by picking a web font in the Google font option of the customizer. I’d recommend Helvetica.

    About the main script size and loading impact, yes I agree. I’m currently exploring ways to split it into different pieces and to load it asynchronously.

    About some hints : I was about to recommend using the free Total Cache plugin but after quickly checking your site I saw that you already use it.

    Thread Starter Robin Labadie

    (@robin-labadie)

    Hello,

    Thanks a lot for your answer.

    I didn’t know some of these were non-google fonts, that’s perfect.
    Changing to a non-google font resulted in a slight improvement of the YSlow score, which is now rated A as well (with W3TC caching enabled!) (yay!)
    https://gtmetrix.com/reports/terageek.org/ummESLXY

    Now it mainly warns about deferring some more JS, and about 5 external JS that remains. Upon watching the waterfall, I cannot find these external JS files, so I assume existing JS on the website calls other external JS. In a perfect world, I guess there would be no external JS, but I’m unsure if that might lead to difficulties maintaining the code. (I’m only a sysadmin, not a web dev, that’s where my knowledge ends for now.)

    It would of course be great to optimize JS and CSS as much as possible. I’ve got no doubts you’ll figure this out eventually. I’m available if there’s anything I can do to help.

    [OFF TOPIC / experience sharing]
    About caching I’ve been experimenting with it on this website lately, after my post here.
    After years of rejecting caching plugins in favor of optimization, I’ve recently been compelled to deploy W3TC + Redis on a server with a heavy and very popular website lately… And got convinced of its usefulness: The 64 threads server went from 400 load to 4. That was nuts.
    So I’ve been experimenting W3 Total Cache on my own website lately, using Redis installed on the web server. For visitor optimization, it seems to work pretty well: it seems to handle expire headers more efficiently than my manual method (it’s kind of a mess, because some files are sent with Apache, and some others are proxied with Nginx, for better performance), and W3TC combines a few scripts, helping with YSlow score. I’m just afraid of how it might handle dynamic content, I couldn’t notice since the website wasn’t very active lately apart from being optimized.

    Here is a test without caching for reference.
    https://gtmetrix.com/reports/terageek.org/90BkH6XQ

    Server optimization wise, it reduces SQL queries from around 80 to 10 queries per page. Upon a stress test with 500 concurrent page requests (for a total of 10.000 pages requested), it doubles the page rate at while reducing server load from 50 to 5.
    So yeah, that’s much useful! I can only recommend the Redis + W3TC solution, on top of everything, Redis is easily installed in 2 minutes on any Linux server.

    All the best!

    Theme Author presscustomizr

    (@nikeo)

    Thanks for this very interesting and useful feedback

    About jquery-migrate, I just found out a plugin specifically designed to address this issue : https://wordpress.org/plugins/jquery-manager/ Did you know about it ?
    Let me know if it helps.

    Thread Starter Robin Labadie

    (@robin-labadie)

    Hey,

    That’s a pleasure!

    Well, I had no success with Jquery Manager combined with W3TC.
    But I found the dedicated “Minify” cache option from W3TC and guess what: You can chose to async JS scripts on top of minifying.

    I obtained an A 100% PageSpeed score! https://gtmetrix.com/reports/terageek.org/fyxehD99
    But it had side effects: Upon running Async or Deferred for code that is “Before </head>”, then images on the website load randomly. I therefore cannot recommend the option for now.

    Visually, I’m guessing it might be due to the image loading animation. Is there any way to disable that entirely? I tried disabling theme’s lazy load without success. I feel like when the website is optimized, the loading animation only slows down the display and might be related to the image loading issue with async js.

    Best

    Theme Author presscustomizr

    (@nikeo)

    OK, I’ll explore this async loading issue and image loading animation problem and let you know if there’s a simple way to disable it. Otherwise it might require a patch in the theme.

    Thread Starter Robin Labadie

    (@robin-labadie)

    Awesome. Do not hesitate to reach back if you need further testing, or even a testing environment.

    Best regards

    Theme Author presscustomizr

    (@nikeo)

    sure 👍

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Ultimate road to optimization: Remove external scrips’ is closed to new replies.