You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The iframe-resizer library aims to take away the pain
points with using iframes. It will resize your iframe to match the size of your content
and then monitors the iframe to ensure that it is always the perfect size.
Reliable Resizing
As browsers don't provide a single consistently reliable method to calculate content
size, iframe-resizer inspects your page and automatically selects the best
value for your content every time your content changes.
Cross Domain
Supports both internal (same-domain) and external (cross-domain) iframes via a simple
JS file that is designed to be a zero impact guest on the sites hosting it.
Lightening Performance
To ensure minimal impact on your site, iframe-resizer is highly optimised and
utilizes Set Theory to ensure it only
checks the page elements that effect the sizing of your iframes.
Even on the most complex pages, iframe-resizer can detect changes to both HTML
and CSS, calculate the revised content dimensions and update the iframe in sub
millisecond time.
Setup
Please see the iframe-resizer website for setup guides
and API documentation. This includes versions for:
Their is also an API to support the creation
of additional custom components.
Extended API
Additionally iframe-resizer provides a range of missing browser API features, that allows you to securely integrate your iframe content with the parent page.
When combined with viewer.js it can even resize iframes containing PDF and ODF documents.
Version 5
This version of iframe-resizer has been extensively rewritten to use modern browser APIs, this has enabled significantly better performance and greater accuracy in the detection of content resizing events.
With this release, the opportunity has been taken to refresh and simplify the API, if you are coming from a previous version then their is an Upgrade Guide to explain the changes.