Hosting, Tools

Page Optimize

Page Optimize is a built in plugin available to sites on our Business and eCommerce Plans.

This plugin supports a few features that may improve how quickly browsers are able to load your site here at WordPress.com:

  • Concatenate CSS
  • Concatenate JavaScript
  • Delay execution of non-critical scripts

Please bear in mind that while these optimizations may improve your loading times, Page Optimize is not guaranteed to improve them, and should not be considered an alternative to ensuring your code is performant.

Debugging

If you notice activating Page Optimize appears to be negatively impacting your site’s performance, please perform these debugging steps:

  • Turn off the Page Optimize plugin
  • Load the problematic page on your site
  • Open the Browser Inspector
  • On the Console tab, look for errors relating to Javascript files (.js)
  • Turn on the Page Optimize plugin
  • View source code of webpage (right-click > View Page Source)
  • Find the data-handle of the script
  • Add the data-handle in the exclusion list

↑ Table of Contents ↑

Browser Inspector

The browser inspector is your brower’s command center, giving you access to development tools that do a range of things, such as inspecting currently-loaded HTML, CSS and JavaScript files and learning which assets the page has requested and the time they took to load. To access this, follow these shortcuts according to your browser:

  • Firefox: right-click > Inspect Element
  • Google Chrome: right-click > Inspect
  • Safari: Click Develop > Show Web Inspector (to turn on this feature, refer to this support doc)

↑ Table of Contents ↑

Console Tab

In the Console tab, you will find errors highlighted in red. In this example, an error occurred in the eu-cookie-law-min.js file. This error can impact the functionality of the Page Optimize plugin, so it makes sense to add it to the exclusion list.

↑ Table of Contents ↑

Data-Handle

The data-handle is the unique slug used by the WordPress software to identify plugins, themes, CSS and Javascript files. Before you can add something to the exclusion list, you must find out the data-handle of the Javascript file. To do this, view the source code of the webpage and look for the <script> tag that contains the data handles. It will look something like:

<script data-handles='mediaelement-migrate,eu-cookie-law-script' type='text/javascript'></script>

Pro-tip: using your browser’s Find tool will make it easier to find the tag. Press Ctrl+F (Windows) or Cmd+F (Mac) on your keyboard and search for <script data-handles

By looking at the tag, you should be able to find the data-handle of the offending script. In this case, it’s eu-cookie-law-script.

↑ Table of Contents ↑

Exclusion List

The exclusion list is a list of data-handles that are ignored by the plugin, meaning they are not going to be concatenated.

To add something to the exclusion list, click Settings > Performance on your wp-admin panel.

In the space under “Comma separated list of strings to exclude from JS concatenating: ” enter the data-handle preceded by a comma.

Click Save Changes.

↑ Table of Contents ↑

Additional Troubleshooting

If the above steps do not help, try the following:

  • Turn off other optimization plugins that may be in conflict with Page Optimize
  • Turn off optimization settings provided by your theme

For additional support, you may contact us here.

Not quite what you're looking for?

Get Help