XFOptimize - Minify, Preconnect & Preload

Beta XFOptimize - Minify, Preconnect & Preload 1.0.1 Release Candidate 1

No permission to buy ($14.00)
  • Fixed a bug which could cause appended preconnect URLs from appearing in some webmaster tools (Bing, Google etc)
  • Fixed a bug which could cause an error "Trying to access array offset of type bool"
  • Fixed several bugs which could occur when using the TinyMinify library
  • Added a new simple regex minification method
  • Adjusted minify PHP listener for slightly better efficiency
  • Minify listener now bails much earlier if no optimization methods are required
  • Risk level labels are now color coded for HTMLMinifier library (Lowest-High)
  • Added a new visual settings page layout with quicklinks to various speed testing sites (GTMetrix etc)
To update your theme, please download the latest version at:

You must select "Overwrite files during install/upgrade" when upgrading to this version.


This update fixes a number of bugs reported by users, including PHP errors when using the TinyMinify library. Also, a new visual header has been added to the settings page, with quicklinks for speed testing tools.

A note on using <!CDATA> tags
Some users have reported front-end breakage when using the HTMLMinifier library and when CDATA tags are present. The following is an example of CDATA script:
<script type="text/javascript">
        alert("Hello World");

While a method is currently being worked on to fix this, it's still recommended to disable the "Minify script tags" option. A solution will be noted in a future release when added.

New visual settings page​


Color coded labels!​

  • Fixed a bug which could cause server error logs related to "Cannot access property message on non-object" in certain situations
  • Fixed a bug which could cause miscellaneous "Cannot read property of null" errors
  • Fixed a bug which could cause server error logs for threads in some older versions of Xenforo
  • Added much more exit points where asset processor scripts will silently abort if there is no content to process (avoids server error logs)
  • Added a new option to enable/disable limiting of automatic preconnect domains (default: Off / limit 5)

This update addresses several user submitted bugs, specifically errors related to threads under certain conditions or versions of Xenforo. In addition, automatic preconnected domains can now be limited via a new setting.


Note that this setting will not be affected if you manually preconnect domains via other methods. This may change in the future if a solution is possible.
  • Like
Reactions: akok and Nirjonadda
  • Fixed more issues which could likely cause unlogged last post timestamps to show a Xenforo phrase instead. This error is still being monitored for further reports.
  • Added an "Optimize" nav entry to the Admin left menu, below Setup -> Options
  • Added various URLs to the entry on the Admin -> Addons list, including Xenforo.com support thread, FAQ, etc
  • The addon will now require Xenforo 2.1.x+ to install
  • Slight performance improvement tweaks
  • Added numerous fixes for UI.X style:
    • Backstretch images are now processed when the feature is enabled
    • The core UI.X JS package is now pre-fetched
    • Several template bugs
    • Further tweaks to allow max minification options without breakage
  • Added considerable support/testing for various third party addons:
    • XenMedio 2 PRO
      • Fixed a number of issues which would not pre-fetch third party media services (DailyMotion, etc)
    • [AH] Discord Widget
    • [AH] Gamer Profiles
    • [AH] Twitter Widget
    • [AnzahTools] Unread posts indicator
    • [AP] Daily Goals
    • [BP] Welcome Notice
    • [cv6] NodeIcon
    • [cXF] Add What's New beside Alerts tab
    • [EAE] Roles
    • [iCodes] Welcome Section
    • [OzzMods] Attachments Plus
    • [OzzModz] Avatar Gallery
    • [OzzModz] Badges
    • [OzzModz] Covers
      • Data-preload attribute loaded for thread view page titles
    • [OzzModz] Highlight User Participated Threads
    • [OzzModz] Latest Content Live Updates
    • [OzzModz] Most Ever Online
    • [OzzModz] Thread Preview
    • [OzzModz] XFRM File Extension And Size Display
    • [OzzModz] XFRM: Price Filter
    • [rellect] Favicon For Links
    • [SC] Instagram Widget
    • [TH] Featured Threads and Content
    • [Wutime] Limited Guest Viewing
    • [XTR] Featured Threads Slider
    • Bespoke - Enhanced Bookmarks
    • [TickTackk] Change Content Owner
    • [Xon] Contact Us Thread
    • DragonByte eCommerce
    • DragonByte Member Map
      • Pre-fetch Google APIs
    • DragonByte Preview Last Post
    • [Xon] Lazy Image Loader
    • s93/MediaSites
    • Siropu Shoutbox
    • [Xon] Thread Reply Banner
    • [Xon] User Activity
    • [Xon] User Mentions Improvements
    • [Xon] Who Replied

This update brings more improvements for UI.X style, allowing more pre-fetching of various theme resources. This includes backstretch images, when using large wallpaper backgrounds within UI.X. Further, the core style JS is now pre-fetched to help with loading.

You can also now quickly access the addon's settings using a new "Optimize" link under the Admin side navigation, below Settings -> Options.

Additionally, a large number of third-party addons for Xenforo were either tested, tweaked with small improvements, or received specific support in the addon. Notably, [TH] Featured Threads and Content, [OzzModz] Covers, and various welcome section addons now take advantage of XFOptimize's features.

If you're using XenPorta, it's recommended to check out XenPorta Improvements, which also received an update which helps with optimization in the form of minified JS and CLS (Content Layout Shift) issues.

More addons will be tested and receive support over further updates. If you have a suggestion, please leave a reply in the product thread at nulumia.com or xenforo.com.
  • Fixed numerous Jquery issues in UI.X theme
  • The reference link for HTMLMinifier in the Admin settings page now correctly points to the right page
  • Fixed a bug where using the [rellect] Favicons for Links addon would show a default favicon when using the Minify script tags option
  • Addressed a bug which could cause the Last Post timestamp to become broken when viewing threads
  • Fixed numerous "Unknown identifier" and "Unexpected var" errors in the browser console when using the Minify script tags and Combine script tags options

This release focuses on improvements to using with the UI.X theme. Numerous bugs have been fixed stemming from improperly formatted Jquery within UI.X not working with the minifier. XFOptimize now automatically corrects these issues.

Currently in testing, you can enable the many fancy features in UI.X and no longer encounter many bugs on the front-end. There's still some work to be done, but this release is a good first step.

Additionally, the addon now works with [rellect] Favicons for Links addon.

Various other small Jquery bugs related to the minifier should now be fixed. These can occur in some situations depending on the theme and addons being used. More steps will taken to fix these bugs with further feedback.
  • Fixed a bug which could cause a PHP error "Attempt to ready property 'group_id' on null" on the Admin Notices list
  • Fixed a bug which could cause hotlinked images not to trigger the lightbox popup
This update requires you to select "Overwrite files during upgrade".

The following files were changed and may need you to clear your browser cache: