Skip to content

perf(static): Add preload hint for app.js entrypoint#115800

Merged
JonasBa merged 1 commit into
masterfrom
jb/perf/preload-app-js-entrypoint
May 19, 2026
Merged

perf(static): Add preload hint for app.js entrypoint#115800
JonasBa merged 1 commit into
masterfrom
jb/perf/preload-app-js-entrypoint

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented May 19, 2026

Start app.js preloading before CSS is fetched and parsed.

Add a <link rel="preload"> for app.js early in the <head> of
layout.html so the browser starts fetching it in parallel with the
CSS rather than waiting for the parser to reach the <script> tag.

Also add a test documenting that content-hashed assets under
/_static/dist/ currently receive NO_CACHE headers despite being
immutable — a follow-up will address that.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 19, 2026

<link rel="preload" href="{% frontend_app_asset_url "sentry" "entrypoints/app.js" %}" as="script" crossorigin="anonymous" />

<link href="{% frontend_app_asset_url "sentry" "entrypoints/sentry.css" %}" rel="stylesheet"/>
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is blocking, the preload can live above

@JonasBa JonasBa marked this pull request as ready for review May 19, 2026 15:14
@JonasBa JonasBa requested a review from a team as a code owner May 19, 2026 15:14
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c1f5258. Configure here.

Comment thread src/sentry/templates/sentry/layout.html
@JonasBa JonasBa requested a review from a team May 19, 2026 16:42
@JonasBa JonasBa merged commit ab64ba6 into master May 19, 2026
57 checks passed
@JonasBa JonasBa deleted the jb/perf/preload-app-js-entrypoint branch May 19, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants