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

Dashboard should configure response compression & caching for static assets #4150

Closed
DamianEdwards opened this issue May 10, 2024 · 3 comments · Fixed by #4153
Closed

Dashboard should configure response compression & caching for static assets #4150

DamianEdwards opened this issue May 10, 2024 · 3 comments · Fixed by #4153
Assignees

Comments

@DamianEdwards
Copy link
Member

DamianEdwards commented May 10, 2024

The dashboard currently doesn't configure compression or caching headers for the static assets it delivers, including libraries like plotly (which is 3.5 MB).

We should configure the response compression middleware to ensure that at least static assets are compressed (and potentially the HTML output too), and investigate setting cache headers for static assets with versioned paths to help improve the client-side experience.

@danmoseley
Copy link
Member

Just curious is this only noticeable in the case where the dashboard is on a different machine?

@DamianEdwards
Copy link
Member Author

Just curious is this only noticeable in the case where the dashboard is on a different machine?

From a UX perspective, most likely.

@DamianEdwards
Copy link
Member Author

TBC the dashboard is configuring the no-cache header for static assets, which forces the browser to honor the E-tag and/or Last-Modified headers sent, which usually results in 304 Not Modified responses for the static assets, so that's less of an issue than I originally thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants