Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static assets served without cache policy leads to suboptimal page speed #322

Closed
freddyb opened this issue Jun 10, 2020 · 1 comment · Fixed by #336
Closed

static assets served without cache policy leads to suboptimal page speed #322

freddyb opened this issue Jun 10, 2020 · 1 comment · Fixed by #336

Comments

@freddyb
Copy link

freddyb commented Jun 10, 2020

Describe the bug

Static assets (list below) are served without any caching header, which results in the browser re-requesting the files too often.

/fonts/Lora-Bold.woff2
/fonts/Lora-Regular.woff2
/fonts/open-sans-v13-latin-regular.woff2
/js/webfont.js
/js/h.js
/js/postactions.js
/js/localdate.js
/css/fonts.css

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Open Browser (e.g., Firefox) Developer Tools and its network panel
  2. Load a writefreely instance
  3. Observe response headers

Expected behavior

writefreely server should have responded with a cache header

Application configuration

  • Single mode or Multi-user mode? single
  • Database? [mysql/sqlite] mysql
  • Open registration? [yes/no] no
  • Federation enabled? [yes/no] no

Version or last commit:
v0.12.0

@thebaer
Copy link
Member

thebaer commented Jun 11, 2020

Thanks for reporting this, @freddyb! I'm sure we can tweak the Go file server to include the right headers.

If anyone wants to work on this, please feel free to open a pull request!

@thebaer thebaer changed the title static assets servied without cache policy leads to suboptimal page speed static assets served without cache policy leads to suboptimal page speed Sep 1, 2020
@thebaer thebaer added this to the 0.13 milestone Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants