• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Make XF faster? Google Page Speed..

digitalpoint

Well-known member
#6
The biggest part of the Page Speed suggestions there is to Leverage Browser Caching... which really is something you should be doing at your server level, not the application level.

I use this (in Apache config) for serving static content:

Code:
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=5184000, public"
</FilesMatch>
It's assuming of course you have the Header module enabled for Apache. Essentially all that does is instruct the user's web browser to not even bother checking if the file/page has changed until 60 days from now for files with the listed extensions.
 
F

Floris

Guest
#12
Does XF already offer some kind of support for CDN? Specifically, is it possible to define alternative absolute URLs for static content, including style images, avatars, etc.? With vB (3.8x), I had to do some small hacks and tweaks in order to make it work.
jQuery is via CDN, config.php supports CDN, and certain elements are stored in the file system for better caching option, and styles are using css more than images. While images can easily be pointed to cdn.* urls, rather than relative path. Other things such as js and css are minified. Search queries are cached, there's PHP code being used in a smart way to improve caching, and options to tell xenforo that caching is enabled, stuff like that all helps bigger boards get the most out of it by offloading to remote servers, browser cache, and internal memory. And general i/o
 

CyclingTribe

Well-known member
#13
An easy way to speed up the delivery of static images in XF is to create a subdomain - say, img.yourdomain.com that points to the same physical location as your XF install.

Change the image URL in the ACP settings to include your new subdomain (http://img.yourdomain.com) - and then browsers can download images at the sane time as other content.

Cheers,
Shaun :D