TownHub - Listing & Directory WP Theme

  1. Home
  2. Docs
  3. TownHub – Listing & Directory WP Theme
  4. Advance Features
  5. Optimize Website Speed

Optimize Website Speed

We recommend using WP Fastest Cache and Autoptimize plugins to optimize your website speed.

WP Fastest Cache plugin

On the sidebar, you’ll see a new menu called “WP Fastest Cache.”

a) Enable the following settings:

  • Cache System
    • Enable caching for faster delivery of pages.
  • Preload
    • Upon clicking this, you’ll get a popup telling you which pages to cache.
    • Check all of them and leave the “pages per minute” at 4 – click “OK”.
    • You may need to reduce this number if your hosting service complains.

WP Fastest Cache Preload Options

  • Logged-in Users
    • Ensures that if you’ve logged in, you see the actual state of your pages, not the cached versions.
  • Minify HTML*
    • Compresses HTML and reduces file size.
  • Minify CSS*
    • Compresses CSS and reduces file size.
  • Combine CSS*
    • Joins your CSS files into a single CSS resource, reducing number of HTTP requests.
  • Combine JS*
    • Joins your JavaScript files into a single JS resource, reducing number of HTTP requests.
  • Gzip
    • Further compress your pages to be smaller in file size and faster to download.
  • Browser Caching

WP Fastest Cache – All enabled settings

Click “Submit” when you’re done.

Important notes

Minification and Combining

Minifying and combining HTML/CSS/JavaScript can break functionality in your website. Minification essentially goes through your scripts are removes extraneous data like comments, formatting, whitespace and other things that computers don’t need to read. Combining takes the contents of each individual script and aggregates them all into a single script.

Because these processes modify data, they sometimes break functionality due to coding typos, syntax errors, duplicate function names, etc.

Make sure to check your site functionality after enabling the minification/combining features. If you find things are broken, disable all minification/combining features, and re-enable them one-by-one to find which feature is causing the issue.

If your hosting environment supports HTTP/2, combination of scripts is not needed, as the HTTP/2 protocol supports multiplexing – essentially allowing multiple downloads using a single TCP connection (as to only 6 parallel connections in HTTP/1.x.)

Page Caching

Whenever you make major changes to the site, like adding a plugin or modifying the CSS/theme, its recommended to delete the cache and preload it again to ensure you’re serving the latest version of the site. You can find the option to delete the cache in WP Fastest Cache in the “Delete Cache” tab.Delete your cache after major changes in theme or adding global plugins.

WP Fastest Cache will automatically preload the cache again after you’ve deleted it. New content like posts or pages do not require you to delete the cache.

Autoptimize plugin

On the sidebar, you’ll see a new sub menu called “Autoptimize” under “Settings”

a) JS, CSS & HTML:

  • JavaScript Options
  • CSS & HTML Options
  • CDN & MISC Options

b) Images:

DO NOT enable Lazy-load images option

USE our built-in function instead

c) Extra:

Delete cache

Whenever you make major changes to the site, like updating theme / plugins or modifying the CSS/theme, its recommended to delete the cache and preload it again to ensure you’re serving the latest version of the site.

a) WP Fastest Cache

b) Autoptimize Cache

Was this article helpful to you? Yes No