Smart memory management for heavy WebGL and game iframes. Auto-detects devices, manages memory zones, prevents Safari from killing your page.
Real scenarios. Real devices. Real pain — eliminated.
600MB iframe fills the budget. Any additional operation crashes the tab. Payment modals, chat widgets, tab switching — all fatal.
Memory managed continuously. Device-aware budgets prevent overcommit. Quality degrades gracefully. Crashes auto-recover.
Every layer works independently. If one misses, the next catches it.
Auto-detects 6 tiers. Optimal budgets per device class.
5 graduated zones. Proportional response to pressure.
Same-origin proxy for full resource control.
Jetsam prevention. Background freeze. Tab recovery.
Auto-restart at lower quality. Progressive degradation.
4 levels. Light pause to full destruction. Resume any.
4 levels. 30s user-lock. Auto or manual.
Shadow DOM debugger. Memory bar. Event log.
Track bytes per domain. Auto-act on limits.
500-entry buffer. Timestamped. Exportable.
IntersectionObserver. Load on entry. Freeze on exit.
useIframeShield() — drop-in with full API.
Proportional response. Not too aggressive. Not too late.
| Zone | Utilization | Response |
|---|---|---|
| Green | 0 – 60% | Normal operation |
| Yellow | 60 – 75% | Quality steps down |
| Red | 75 – 85% | Non-visible iframes frozen |
| Critical | 85 – 95% | Single iframe, minimal quality |
| Emergency | 95%+ | Destroy low-priority iframes |
deviceProfile: 'auto'
| Device | Budget | Strategy |
|---|---|---|
| iPhone SE / older Android | 600 MB | Aggressive |
| iPhone 12-15 | 800 MB | Balanced |
| iPhone 16 Pro / flagship | 1000 MB | Relaxed |
| iPad | 1000 MB | Relaxed |
| Laptop / Desktop | 1500 MB | Minimal |
| Gaming PC | 2500 MB | Monitor only |
import { useIframeShield } from 'iframe-shield/react'; function Game({ url }) { const { iframeRef } = useIframeShield({ src: url, estimatedMemoryMB: 700, config: { quality: 'auto', crashRecovery: { enabled: true } }, }); return <iframe ref={iframeRef} src={url} />; }