Support » Plugin: Jetpack by WordPress.com » Front end issues

  • Why do I need to load almost 500kb of assets in front end when the only features I use are Publicize (backend) and Stats (ok, here I can see why you might use some js)…

    I was thinking about buying the “awesome” pro plan but when I saw that I needed 3 more plugins I was like… WTF!?

    I can’t use this plugin when I’m trying everythig I can to minimize the requests and the size of the assets (Grunt, Uglify, SASS) and with just a click (activate), I ruin everything…

    Thanks, but no, thanks. The idea behind the plugin is good. The implementation is…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Thanks for the feedback!

    Jetpack does indeed load 2 things on the frontend of your site, even when you only use Stats and Publicize:

    • We load a JavaScript file used for Stats. That’s not really something you can remove if you’re interested in Stats, as you mentioned. The file is minified, and served from our CDN. The same file is loaded across all Jetpack and WordPress.com sites, so if you’re lucky the file might be cached in your visitors’ browser when they reach your site.
    • We serve an additional file, named devicepx. It’s also minified and served from our CDN. It’s used to handle Retina devices and offer a larger version of your images when appropriate and possible.

    In your particular case, you might not be interested in that file. You could remove it like so:

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

    We’re also considering making it a module that you could deactivate easily. That hasn’t happened yet, because we’re also considering removing it completely now that WordPress Core handles responsive images better. You can follow our progress on this issue here.

    I was thinking about buying the “awesome” pro plan but when I saw that I needed 3 more plugins I was like… WTF!?

    The plugins are indeed useful if you’re interested in some specific features in the plan; luckily, we’ll help you install what you need when you purchase the plan. If you’re only interested in some of the features, you might not need to enable the 3 plugins.
    Were there specific features that you were interested in? If you were only interested in backups and security scanning, you could only install the VaultPress plugin. If you’re only interested in fighting spam in your comments and contact forms, you could only install Akismet. If you’re only interested in managing surveys and polls from your dashboard, you could only install the Polldaddy plugin. All 3 services are available separately if you’d rather not use all 3 of them. Another alternative can be to purchase the plan, but without installing all 3 plugins.

    I personally don’t use polls or surveys on my personal site, so I got a Plan but only installed VaultPress and Akismet, for example.

    Let me know if that makes sense!

    ’m trying everythig I can to minimize the requests and the size of the assets (Grunt, Uglify, SASS) and with just a click (activate), I ruin everything…

    That’s something we also work on. We take performance very seriously, and continuously make improvements to Jetpack’s footprint. It’s not perfect, but we’re working on it.

    We for example concatenate and minify CSS into a single file to limit the number of requests made when using different Jetpack modules. We’re working on doing something similar with JS files.
    If you’re interested in checking our performance work, or even share your ideas and remarks, and contribute, you can check the “Performance” label in your GitHub repository. We’ll be happy to see what we can do to improve things or fix the bugs you may find!

    Thank you for the quick response. I’m interesed only in the backend part of Jetpack (including Security, Backup, Sitemap, Seo) and that’s why I was so disapointed about so many assets.

    One very nice idea would be if we could load only those backend features without touching the frontend. In fact, that’s why I’m a WordPress developer, because I can take care of my view (theme) without having to import anything (except jquery which we can’t live without) from the backend.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    I’m interesed only in the backend part of Jetpack (including Security, Backup, Sitemap, Seo)

    Security, Backup, Sitemap, and SEO Tools don’t add any assets to the frontend of your site, so you can use those features without having to worry about resources loaded when visiting your site.

    One very nice idea would be if we could load only those backend features without touching the frontend.

    While that’s not presented as an option in your dashboard, that can be done. You can use the snippet I posted above to remove devicepx. I could give you a snippet to remove the Stats js file as well, but since that will effectively break stats, I think you’d be better off deactivating the Stats module if you’re not interested in the feature.

    Once you’ve done that, Jetpack won’t be loading any assets on the frontend of your site.

    Let me know if that helps!

    Cool. I’ll give it a try and if everything is ok, I’ll change my rating to 5 stars.

    I’ll come back with an answer in the next 24 hours.

    Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Front end issues’ is closed to new replies.