Optimized themes (SEO / PageSpeed)

Mr. Jinx

Well-known member
I was wondering if there currently is any theme that is better and faster than XF's default theme?

For example, I like the UI.X 2 theme from ThemeHouse, but it feels slower or more bloated than XF's default theme.
It also does not give a good score with PageSpeed.
So are there any really optimized themes out there with focus on mobile speed?
 
Update:

Although I haven't found any theme that does a better job than the default XF theme, I made big progress:

Mobile:
1621006697115.webp

Desktop:
1621006714764.webp

Ok, I must admit, this is with Google Adsense disabled. I'm really struggling with this because Adsense gives me some nice amount of money, but it such an impact on my website. All those cookies, javascript and dozens of external downloads from weird advertiser.
It's not only slowing down things, but security and privacy are also huge topics.

For now, link replacements seem to do very well for monetization.

Other speed improvements I did:
  • Switched to a faster VPS with Centminmod
  • PHP 8 with PGO and JIT enabled
  • Activated Redis guest page caching (finally working correctly on this new server)
  • Reduced Font Awesome size with Kirby's add-on (still in private beta)
 
This is what I'm using, exactly the same as my previous server except now it is using TCP instead of Unix sockets.

Code:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['sessions'] = true;
$config['cache']['config'] = [
        'host' => '127.0.0.1',
        'port' => 6379,
        'persistent' => true,
        'serializer' => 'igbinary',
        'database' => 0,
        'use_lua' => true
        ];

$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'Redis';
$config['cache']['context']['page']['config'] = [
        'host' => '127.0.0.1',
        'port' => 6379,
        'persistent' => true,
        'serializer' => 'igbinary',
        'database' => 1,
        'use_lua' => true
        ];
 
This is what I'm using, exactly the same as my previous server except now it is using TCP instead of Unix sockets.

Code:
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['sessions'] = true;
$config['cache']['config'] = [
        'host' => '127.0.0.1',
        'port' => 6379,
        'persistent' => true,
        'serializer' => 'igbinary',
        'database' => 0,
        'use_lua' => true
        ];

$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'Redis';
$config['cache']['context']['page']['config'] = [
        'host' => '127.0.0.1',
        'port' => 6379,
        'persistent' => true,
        'serializer' => 'igbinary',
        'database' => 1,
        'use_lua' => true
        ];

I am already enabled Redis Cache then if we need enable Redis guest page caching and does this code correct? Previously we have this issue.


Code:
// START Redis configuration //
$config['cache']['enabled'] = true;
$config['cache']['sessions'] = true;
$config['cache']['namespace'] = 'xfredis_';

$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = array(
'server' => '127.0.0.1',
'port' => 6379,
'connect_retries' => 2,
'use_lua' => true,
'compress_data' => 6,
'read_timeout' => 1,
'timeout' => 1,
'serializer' => 'igbinary',
//        'serializer' => 'php',
'persistent' => true,
);
// END Redis configuration //

// START Guest page caching //
$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'Redis';
$config['cache']['context']['page']['config'] = [
        'host' => '127.0.0.1',
        'port' => 6379,
        'persistent' => true,
        'serializer' => 'igbinary',
        'database' => 1,
        'use_lua' => true
        ];
// END Guest page caching //

// START CSS caching //
$config['cache']['context']['css'] = [
            'namespace' => 'sv',
            'provider' => 'SV\RedisCache\Redis',
            'config' => [
'server' => '127.0.0.1',
'port' => 6379,
            ],
        ];
// END CSS caching //

// START Mobile detection with full page caching //
$config['pageCache']['onSetup'] = function (\XF\PageCache $pageCache) {
    $pageCache->setCacheIdGenerator(function(\XF\Http\Request $request) {
        return \SV\BrowserDetection\CacheHelper::getPageCacheId($request);
    });
};
// END Mobile detection with full page caching //
 
Looks ok, but your problem is probably server related.
I couldn't get guest page cache working correctly on my previous shared hosting server with Apache.
Now on a new server with Nginx, it works fine with the same config file.
 
Back
Top Bottom