spa

package
v0.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

Handler returns an http.Handler that serves the SPA. For any path not matching a static file, serves index.html (SPA client routing).

Caching is split so a fresh build is ALWAYS picked up on the next load:

  • assets/* are content-hashed (e.g. index-D1r1BErK.js) → immutable, cache forever.
  • index.html (and sw.js / manifest / icons) → no-cache, so the browser revalidates and never pins a stale index.html that references last build's asset hashes. Without this, a normal reload kept serving the old bundle and code fixes never reached the user — only a hard-refresh did.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL