What's a feature policy?
Feature Policy is a new way of controlling the availability of features on the web platform —
you can read more on this page, or check out the Web Fundamentals blog post.
What can I use feature policy for?
Quite a bit, actually!
Control the use of powerful features on your site:
- Video Autoplay
- Encrypted Media
- Device Sensors
- Camera access
- Microphone access
- Payment requests
Improve your site's performance by disabling things that make sites slow:
- Synchronous XMLHttpRequest
- Layout-inducing animations (Coming soon)
- Unsized images (Coming soon)
- Oversized or unoptimized images (Coming soon)
- document.write (Coming soon)
- Synchronous script elements (Coming soon)
Try it on your site!
Include this header with pages served from your site:
Feature-Policy: oversized-images 'none'; sync-xhr 'none';
unoptimized-images 'none'; unsized-media 'none'
Try it in DevTools!
Try a demo!