• Hi,
    I am working on [ redundant link removed ] and seen problems with my external javascript files.As they took long time to locate and load.Here is the pingdom tool result when I checked it for my site.

    There are 3 JavaScript files served. They should be combined into as few files as possible.

    
    /?wc-ajax=get_refreshed_fragments
    /wp-content/cache/autoptimize/js/autoptimize_7c7cf4c84e767a9328f65939562848f0.js
    /wp-includes/js/jquery/jquery.js
    

    There are 3 JavaScript files served from connect.facebook.net. They should be combined into as few files as possible.

    
    https://connect.facebook.net/en_US/fbevents.js
    https://connect.facebook.net/signals/config/1637816636233965?v=2.8.14&r=stable
    https://connect.facebook.net/signals/config/1832642293423843?v=2.8.14&r=stable
    

    There are 2 JavaScript files served from code.jivosite.com. They should be combined into as few files as possible.

    
    https://code.jivosite.com/script/widget/UurZrM8pRc?plugin=wp
    https://code.jivosite.com/script/widget/config/UurZrM8pRc?rnd=0.2969590511638671
    

    There are 2 JavaScript files served from stats.wp.com. They should be combined into as few files as possible.
    https://stats.wp.com/e-201818.js
    https://stats.wp.com/s-201818.js

    There are 2 JavaScript files served from http://www.google.com. They should be combined into as few files as possible.

    
    https://www.google.com/jsapi?autoload=%7B%22mod ... esso.css%22%2C%22language%22%3A%22en%22%7D%5D%7D
    https://www.google.com/uds/api/search/1.0/f9d319213db9a87438e3102cff9a2ec9/default+en.I.js
    

    Can I combine these external JS to one or two files to reduce HTTP requests.If yes them please guide me the easiest way to do this.Please keep in mind I am new to wordpress and web development.

    • This topic was modified 8 years, 1 month ago by rizkirmani.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello!

    1. You have no power over the external files, like those from Facebook, Google, or any other 3rd party website, simply because they’re not on your website.

    2. Some files must be separated in order to function properly.

    3. I think that combining files is not such a big deal anymore, since the appearance of HTTP/2, which any respectable hosting should support.

    It’s considered a deprecated technique, and some say that it can even slow down your site when used with HTTP/2.

    If you’re on a hosting that doesn’t support HTTP/2, then yes, you should combine whatever possible.

    Use this tool to check your website(s) – https://tools.keycdn.com/http2-test

    Thread Starter rizkirmani

    (@rizkirmani)

    Thank you very much for quick response.I’ve checked from the link you provided and my host supports HTTP/2.Can I host the script on my own server?Is this a good way to solve the issue?Or I can leave this as it is?

    Then it’s good news, so don’t worry about it.

    And if you mean if you can host external scripts from 3rd party websites on your own server, then no.

    Thread Starter rizkirmani

    (@rizkirmani)

    Thank you Blade for your valuable answers.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Combine external javascript’ is closed to new replies.