通过 nginx 使用高效的缓存策略提供静态资源
我正在努力提高网站的性能。根据 Google Page Speed Insight,我现在得到了大约 83 分。虽然这不是最糟糕的,但也不是很好。问题之一是缓存,我需要利用缓存并延长静态资产的使用寿命。
我的网站位于 Cloudflare 后面。我需要在那里应用任何设置吗?
I'm trying to increase the performance of my site. I got about ~83 right now accordingly Google Page Speed Insight. While it's not the worst, it's not great either. One of the issues is caching, I need to leverage caching and increase the long life of my static assets.
My site is behind Cloudflare. Do I need to apply any settings there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将这些行添加到: /etc/nginx/sites-available/default
和
service nginx reload
结果
add these lines to : /etc/nginx/sites-available/default
and
service nginx reload
Result