• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
iGuRu

iGuRu

Real-time Technology News. Opinions & Tweaks

  • / news
  • / infosec
  • / tools
  • / tweaks
  • / dummies
  • / opinions
  • / support
home / tweaks / WordPress: Hack to Jetpack for better performance

WordPress: Hack to Jetpack for better performance

07/01/2018 08:05 by giorgos

I remember when I started with WordPress, Jetpack was one of the first plugins I used. The add-on has a lot of features in a single package, which was very appealing to an n00b like me. Later I started disabling features, and in the end I left only Site Stats and Protect.

Finally I turned off Jetpack completely because the plugin always burdens WordPress with too many requests on its servers Automattic, which has a direct effect on the speed of the site using the add-on.jetpack plugin - WordPress: Hack on Jetpack, for better performance

Lately, however, even after Disable Disqus, I thought to re-use the Automattic plugin, as it has a very good login system for WordPress comments.

But what I definitely did not want was to make discounts on the performance of iGuRu.gr. Below we will see how you can disable all external requests that Jetpack sends to WordPress.

When you install Jetpack, you will notice a lot of HTTP requests, addressed or better yet, called external domains

See below:

https://s0.wp.com/wp-content/js/devicepx-jetpack.js
https://ax.Gravatar.com/js/gprofiles.js
https://wp-content/plugins/jetpack/modules/wpgroho.js ( )
https://stats.wp.com/e-201500.js
https://wp-content/plugins/jetpack/modules/likes/queuehandler.js ( )
https://ax.Gravatar.com/css/hovercard.css?see=201500
https://ax.Gravatar.com/css/services.css?see=201500
https://pixel.wp.com/g.gif

All these functions create more requests (calls), additional DNS searches, additional delays for TLS handshake, etc. So if you do not use the functions, they only cause problems, which lead to very poor performance in the speed of the site.

Let's see how you can turn off all requests in the Jetpack add-on, and then how you can turn on the feature you need.

Click on "Settings" in Jetpack.
Scroll to the end and click on "Debug".
Click "Access to the full list of Jetpack units available on your site".
1jp - WordPress: Hack on Jetpack, for better performance

Click on the selection of modules that you do not need and from the drop-down menu select "Disable". Of course you can select them all and then activate the ones you want.

Some of the features of Jetpack do not generate external requests, for example, I have disabled everything except: Comments, Notifications, and Protect.

The above steps will rid your page of too many requests. But not from the JavaScript file, devicepx-jetpack.js, which is used to manage image replacements on HiDPI (High DPI) devices and Retina displays.

To get rid of it, you need to tweak your theme's functions.php file. The following code will disable JavaScript from the front and back end of your site, ie it will disappear.

Open functions.php with your favorite editor (try it Notepad + + for Windows or geany for Linux) and at the end of the file add:

function remove_devicepx() {
    wp_dequeue_script( 'devicepx' );
}
add_action( 'wp_enqueue_scripts', 'remove_devicepx');
add_action( 'admin_enqueue_scripts', 'remove_devicepx' );

That's it. Make a drop in the cached files of your page and try in GTMetrix to see your site. The service, after testing your page, will show you (in Waterfall) all HTTP requests.1gt - WordPress: Hack on Jetpack, for better performance

The only change from previous tests in GTMetrix, on the page of iGuRu.gr, is that the Total Page Size was raised to 202KB from the previous 180 (without changes in the image).

But devicepx has completely disappeared.

I'm not a friend of Jetpack because I think performance is more important. For others, however, this add-on is considered top notch, especially if they are not interested in the requests it sends.

WordPress: Hack to Jetpack for better performance was last modified: 7 January, 2018, 8: 13 am by giorgos

Subscribe to our newsletter

no spam

spread the news

  • Facebook
  • Twitter
  • Reddit
  • Printing
  • Email

Read them Technology News from all over the world, with the validity of iGuRu.gr

Follow us on Google News


Competition: tweaksDay: https, I'm sure, Jetpack Wordpress, ax, services

You May Also Like

Capture HTTPS / FTP packages with ARP Spoofing and MITM
Brave the first browser with Peer-to-Peer IPFS protocol
Chrome will test HTTPS when loading web pages

About Us giorgos

George still wonders what he's doing here ...

Previous Post: « AMD vulnerability of Secure Chip-On-Chip free on the internet
Next Post: Break your neighborhood's free Wi-Fi for Monero mining »

Reader Interactions

Comment Policy:

IGuRu.gr does not publish the comments immediately. Malicious comments, comments that include ads, or comments that are offensive are deleted without notice. We do not adopt the opinions expressed by our readers.
Your comments will be displayed after approval by the administrators


Leave your comment
Ακύρωση απάντησης

Your email address is not published. Τα υποχρεωτικά πεδία σημειώνονται με *

 

 © 2021 · iGuRu.gr · ☢ · Keep It Simple Stupid Genesis theme

about  ·   get in touch  ·  rss  ·  sitemap  ·  cough

loadingCancel
Could not post post - check your email address!
Email verification failed, please try again
Your blog can not post posts via email.