Mastodon Feed: Post

Mastodon Feed

Reblogged by slightlyoff@toot.cafe ("Alex Russell"):

wolframkriesing@mastodontech.de ("Wolfram wants peace") wrote:

You think you need an SPA?
Try this and you feel no difference (often):

  1. extremely fast loading page
  2. onunload: store scroll offset e.g. in localStorage
  3. at the bottom of the HTML restore scroll offset
  4. make slow JS inside the page async and use nice spinners

And voilà a page load feels like an inline content update, just like an SPA.

If you want you can also add
@view-transition {
navigation: auto;
}
which makes it even smoother in browsers that support it

#website #performance