Optimizations – How to Select The Working Optimization Options for Your Site

Article sections

    Overview

    The optimization options of Easy Social Share Buttons for WordPress is a set of tools to optimize plugin work. All options you can find in Advanced -> Optimizations

    Optimization Levels

    The optimization levels are a selection of pre-set options in the optimization setup screen. You can use those modes as a starting point.

    • Custom – reveal all optimization options for manual selection.
    • No optimizations – turn off any option from this screen. You can use it if you have a cache solution or optimization plugin on your site.
    • Basic – apply only minified resource load and add a non-render blocking method of javascript loading. You can use it with a cache plugin that does not support minification or static resource optimization.
    • Medium – extend the basic model with activation of the pre-compiled mode of the static resources.
    • Advanced – add in addition to the medium also usage of selective style builder.

    Recommendation! If you are not sure how to configure the optimization options go ahead with Basic or Medium mode.

    Manual Configuration of Optimization Options

    CSS Style Optimizations

    • Use minified CSS files – use the build plugin minified version of the CSS styles (recommended).
    • Generate dynamic CSS in the footer instead of the header – dynamic styles are those that reflect specific changes or personalizations in the settings. For example, such a style can be a result of color change in the settings of the display method, building custom colors for various components, etc. The default loading is assigned like it is recommended to be in the header of the site (just after the static CSS files). The option here will change that behavior and load styles just before the end of the page. The option will make the header of site smaller (generated code from the plugin) but it may also produce “the blink” effect of styles (if your page content is larger). 
    • Generate dynamic user styles for active display positions only – plugin generates the dynamic styles for all positions, no matter they are active or not. That is made because you can dynamically change the active positions using advanced options for post types, device types, etc. But if you do not make such advanced settings it is recommended to use this option to eliminate the generation of previous dynamic styles, not used currently on site.
    • Stylesheet type – control the version of the main stylesheet file that the plugin will use. The default option is full (everything). But if you do not need all the templates or counter styles you can try the slim (almost half the size). The change will remove from the set up a few templates and counter styles.
    • User CSS style builder – the option will enable a CSS style builder. The build will produce a static resource file based on the selected stylesheets from the list. And the plugin will always use those styles. In case you did not make any selection it will load a blank style, waiting for fully user styles. Warning! This is an advanced option for experienced users only. If you are not sure you need this do not activate it – it may produce a problem with the share buttons display.

    Script Optimizations

    • Use minified javascript files – use the build plugin minified version of the javascript styles (recommended).
    • Load javascript files in the header of the site – move the loading of plugin static javascript files into the header of the site. This option is not recommended to be used unless you have javascript errors on your site from other plugins that prevent work.
    • Load plugin javascript files asynchronous/deferred – those options are optimized script loading methods. You can use one of them at the same time. If you are not sure what do they mean you can try the asynchronous load.

    Combine CSS And Javascript Files (Pre-Compiled Mode)

    This is a unique model of the plugin that will capture all used styles and scripts (including the dynamic generated) and generate static CSS and javascript files for use (one of type). And from now on it will use just those files only. For optimization purposes, those files will also load from the footer of the site (providing a non-render blocking page load).

    The cache of pre-compiled mode is always refreshed when you save plugin settings. If you move your site to a new domain, change the protocol, etc. then you can also temporary turn off-on the option to make full rebuild of cache files (set to No, Save settings, then set to Yes Save settings).

    • Enable combine CSS and Javascript files – enable usage of the mode.
    • Optimize – select resources that plugin will optimize: CSS files, Javascript files or both (default).
    • Cache data storage – select where the plugin will store the generated static files. WordPress content folder is the root wp-content folder of the installation (this folder may not have permissions to save files and if so you can change to one of the other available). WordPress upload folder is the default folder where WordPress stores all uploads (wp-content/uploads) – it is enabled for writing by default. The last option is to store the files inside the plugin folder. Be aware that if you choose this mode on each plugin update you need to refresh the pre-compiled mode cache (because of how WordPress does updates).
    • Generate unique filename – make all the time plugin generates and unique file name of the static resources. That eliminates the possibility of the user to see a previous version from the browser cache. Recommended for usage if you setup expiration tags on a server level.

    Global Optimization

    • Remove the plugin version from static resources – this will remove the generated from Easy Social Share Buttons for WordPress version on the static resources. Instead of this WordPress will generate its version or none if additional optimizations are used. This will make the visitor browser to load at first from browser cache if present the static resources.
    • Load static resources on – select where you need to load the plugin resources. You can choose between Everywhere, Selected Post Types or Selected Post/Page IDs. The default mode is everywhere and if you plan to use shortcodes, custom displays or content builders we recommend to keep it that way. The other mode you have is “On activated post types in Where to display” – this will load resources only for the post types you choose to show share buttons. If you use plugin components (not only share buttons) outside that list you may see visual glitches. The last mode is to load on selected post/page IDs. Using this mode you can make resources loaded only on the provided IDs. You can use this mode if plugin features will run only on those pages. This mode can be used even if you build content custom with a builder.
    Was this article helpful?
    YesNo
    in Advanced SettingsFeatures
    Was this article helpful?
    YesNo