How to Embed an Iframe in SharePoint Online
An iframe provides a basic way to display content from other websites or applications within a webpage. In SharePoint Online, users can Embed an Iframe to display dashboards, videos, forms, maps, reports, and other web-based tools without leaving the current page. This improves the overall SharePoint user experience by keeping essential information consolidated in one place, although adding an iframe requires an understanding of its security restrictions and system limitations.
What Is an Iframe?
The iframe function allows a full webpage to be displayed within a smaller section of another webpage, acting as an inline frame element. It can be used to embed various types of content, such as YouTube videos, Microsoft Forms, Power BI dashboards, Google Maps, or even entire websites and internal business applications. This feature helps users easily access important information directly from a SharePoint page without needing to navigate away.
Where Iframes Can Be Used in SharePoint Online
The Embed web part serves as the primary method to implement iframes in current SharePoint Online pages. The web part enables users to insert embedded codes or direct URLs from recognised content providers. Users can implement custom code through Script Editor and Content Editor web parts on Classic SharePoint pages, but these features have lower usage rates in SharePoint Online due to security restrictions. The Embed web part functions as the most secure and user-friendly solution for modern SharePoint sites used by most organisations.
Steps to Embed an Iframe in SharePoint Online
You can easily add an iframe to your SharePoint page when the external source permits you to do so.
1. Open the SharePoint Page
The first step requires you to access the SharePoint site, which needs the iframe. Open the page and click Edit in the top-right corner.
2. Add an Embed Web Part
The user needs to move their cursor over the designated area, which requires the iframe to be shown, and then they must select the plus button. From the list of web parts, select Embed.
3. Paste the Embed Code or URL
The user needs to paste the full iframe embed code, a direct website URL, or a supported link from a service like YouTube or Power BI between two separate sites after they have included the Embed web part into their work. A basic iframe code may look like this.
4. Resize and Adjust the Display
The iframe area size can be changed through modifications to height and width specifications. The content should be displayed correctly on all screen sizes, which include desktop and mobile platforms. Dashboards, forms and reports benefit from increased height because it eliminates the need for users to scroll within the viewing area.
5. Publish the Page
Users must click Republish or Publish after they examine the embedded content to proceed with the changes that they want to show to other users.
Common Uses for Iframes in SharePoint Online
Many organisations use iframes to bring important business tools into SharePoint pages.
A few common examples include:
YouTube training videos
live Power BI report displays
employee feedback and survey forms
The office location interactive map displays
external website and internal web application displays
calendar and scheduling tool embedding
The SharePoint pages enhance their interactive features because of this development, which provides employees with more valuable resources.
Why an Iframe May Not Work
The system needs to display its proper function to the user through an iframe, which fails to work despite correct coding. The external website prevents users from showing its content through an iframe because the website has set up security restrictions. Many websites use security settings such as:
X-Frame-Options
Content Security Policy
Same-origin restrictions
These security settings
Stop other websites
from displaying their content
through an iframe.
Best Practices for Using Iframes
The optimal outcomes from using iframes in SharePoint Online require adherence to these established best practices. The only websites and applications that users should access need to be trustworthy. Iframe dimensions should maintain their ability to adjust according to various screen dimensions. The system requires users to test every page across both desktop and mobile platforms. Users should prefer using SharePoint web parts as their primary solution instead of Iframe technology. The user needs to verify whether the external website permits iframe content to be embedded on their site. The security and compliance requirements need to be assessed before any content can be published. The excessive use of iframes on a webpage results in two main problems, which include reduced page speed and increased difficulty for users to navigate.
Alternatives to Iframes in SharePoint Online
The optimal performance of iframes in SharePoint Online requires users to follow these established guidelines.
The organisation should restrict its online activity to trusted websites and applications.
The organisation should design its iframes to function properly on all screen dimensions.
The organisation should limit its page content to display only essential elements.
The organisation needs to verify the website's ability to support iframe embedding.
Web parts should be used in SharePoint whenever they exist as an alternative to iframes.
The organisation needs to confirm that the external website permits iframe embedding rights.
The organisation needs to assess security and compliance standards before it proceeds with content publication. The excessive use of iframes on a webpage results in performance issues while creating difficulties for users who want to access different content sections.
Final Thoughts
Embedding an iframe in SharePoint Online is a simple way to display external content without leaving the page. Whether you are adding videos, forms, reports, or websites, the Embed web part makes the process quick and easy. Before adding an iframe, always confirm that the source allows embedding and meets your organisation’s security requirements. When used correctly, iframes can make SharePoint pages more useful, interactive, and engaging for users.
Comments
Post a Comment