SEO: Serve static assets with an efficient cache policy and text compression

My YunoHost server

Hardware: VPS bought online …
YunoHost version: 11.2.4
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | …
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no / yes
If yes, please explain:

Description of my issue

Hi, there. First of all, Yuno host rocks! it is very convenient to setting up on VPS and easy to use. Really appreciate the team!

However, there are several issues happened when I try to optimize the website. According to google pagespeed insights, we should set some effective cache policy for static assets properly, and also launch the text compression. We tried to set it through many ways, including editing in nginx files directly, using WP plugin enable browser caching (W3 total cache), but it doesn’t take any effects on it. Is there any special for setting cache policy on Yuno Host server? How should we do?

(Setting on WP plugin, W3 total cache)

Another issue is text compression for webpage. We learnt that Yuno host may not support Gzip because of security issues, so shall we use other popular compression tech, like Brotli on Yuno Host? How should we setting up it properly?

Thanks a lot and have a good day!

Jim

The whole thing about not enabling Gzip is related to BREACH and is a complex story, but the bottom line is : we can’t enable it in the general case, but if you only serve static assets or somewhat “simple” dynamic website that is not likely to leak secrets through a public API, then it’s “fine” to enable gzip manually.

You can find the corresponding line with grep gzip /etc/nginx and change the off to on, then reload nginx with systemctl reload nginx

Right, more specifically, Gzip could be turned on via /etc/nginx/conf.d/security.conf.inc. Thank you for your reply!

Is there anyone know how to set some effective cache policy for static assets effectively on Yunohost? plugins for WP doesn’t work properly. Hope to learn more.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.