iOS Safari Protection
Purpose-built for Safari's jetsam process killer. Detects pressure signals and acts before the browser kills your tab.
Signals Monitored
| Signal | Detection | Response |
|---|---|---|
| Page backgrounded | visibilitychange, pagehide, blur | Freeze all iframes |
| Low priority + background | Same events | Destroy (not just freeze) |
| FPS drop < 20 | rAF timing analysis | Downgrade quality |
| FPS drop < 10 | Sustained low FPS | Freeze all but highest priority |
| GC pause > 200ms | Frame delta spike | Memory warning |
| Tab previously killed | document.wasDiscarded | Restart at minimal quality |
| Memory nearing limit | Preflight estimation | Block new iframe loads |
Configuration
new IframeShield({ ios: { crashPrevention: true, backgroundFreeze: true, backgroundDestroyLowPriority: true, memoryWarningThreshold: 0.7, aggressiveCleanup: true, maxMemoryMB: 1200, }, });
Important: iOS Safari has no
performance.memory API. Memory detection relies on FPS analysis, GC pause detection, and allocation timing probes.