WICG / portals

A proposal for enabling seamless navigations between sites or pages
https://wicg.github.io/portals/
Other
946 stars 66 forks source link

Use Case: Live Reload with loading error handling in development #274

Open jkrems opened 3 years ago

jkrems commented 3 years ago

I didn't see any mention while skimming existing docs: I'm interested in portals for use in a development server. The idea would be to prepare a full page reload in a portal and show UI feedback to developers on the current version of the page. If the reload fails (or takes too long), the dev server runtime in the browser could either retry or alert the developer that something's wrong.

The only existing options (outside of portals) I'm aware of are:

  1. Use location.reload(). If something goes wrong, the developer has a broken tab and it can't be fixed without human intervention.
  2. Move the app permanently into <iframe>s during development which may interfere with the actual content and requires full control of the initial page load to work well.