# Live Content

## Basic Injection (Replace)
Click the button to fetch server-rendered content and replace the target area.

## Append Mode
Each click appends a new notification to the end of the list.

## Prepend Mode
New content is inserted at the beginning of the target, pushing older items down.

## Counter via Partial Swap
The counter is stored in the session and updates reactively through live injection.

## Add & Clear Notifications
Add notifications to the list, or clear them all at once. Both operations happen without leaving the page.

## Real-Time Updates
Need server-pushed updates without polling? Wired variables broadcast over WebSocket and every `w-bind` element updates instantly — across pages and browsers.

## How It Works
Live Content Injection

This page demonstrates live content injection without full page reloads. Each button uses w-get to fetch a partial template from the server, w-target to select the destination element, and w-swap to control insertion mode (replace, append, or prepend). Session state persists across requests, enabling counters and notification lists that survive interactions.

### Source
```
Loading...
```
