Skip to content

About

A local browser lab for page lifecycle events, visibility changes, and back-forward cache signals.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Animated header

Typing SVG

License Top language Stars Last commit

Page Lifecycle Lab mark

🧭 Overview

A local two-page browser playground for observing page lifecycle events and back-forward cache signals. Navigate between the pages and inspect the event timeline, including the persisted flag on pageshow and pagehide.

✨ Features

  • 👁️ Tracks visibilitychange and the current document visibility state.
  • 🔁 Logs pageshow and pagehide with their persisted values.
  • 🧊 Listens for freeze and resume where the browser supports them.
  • 🧪 Provides a same-origin navigation flow for trying Back and restoration.

🖥️ Demo

Run the local server, open the first page, navigate to the second, and return with Back. Browser event ordering and BFCache decisions vary by browser.

⚡ Quick Start

npm start

Open http://127.0.0.1:4175.

🧰 Tech Stack

  • Node.js 18+ — dependency-free local static server.
  • Browser JavaScript — Page Visibility and page lifecycle events.
  • License — MIT

🗂️ Folder Structure

browser-page-lifecycle-lab/
├── public/
│   ├── assets/mark.svg
│   ├── app.js
│   ├── index.html
│   ├── second.html
│   ├── second.js
│   └── styles.css
├── .gitignore
├── LICENSE
├── package.json
├── README.md
└── server.js

🛣️ Roadmap

  • Add a browser compatibility matrix.
  • Add an optional event export to JSON.
  • Add a controlled test for BFCache restoration behavior.

🤝 Contributing

Issues and pull requests are welcome. Keep the demo local and describe browser-specific behavior accurately.

📄 License

Released under the MIT License.

Animated footer

About

A local browser lab for page lifecycle events, visibility changes, and back-forward cache signals.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages