This SharePoint tutorial explains the Page viewer web part in SharePoint Online or SharePoint 2016/2013/2010. We will see what is a page viewer web part in SharePoint? How to add and configure a page viewer web part in SharePoint Online/2019/2016/2013?
Also, we will see, how to work with Page viewer web part in SharePoint online modern sites.
I have also uploaded a video tutorial on the Page viewer web part in SharePoint or SharePoint page viewer web part.
We will also see, how we can display a file or folder using a page viewer web part in SharePoint.
The page viewer web part in not available in SharePoint online modern sites in office 365. But we can use the below two web parts which will work like a Page viewer web part in SharePoint.
- SharePoint modern Embed web part
- SharePoint modern Link web part
Modern Embed web part
In SharePoint Online modern sites, we can use the embed web part to display a page, here is how you can try.
Edit the page where you want to add the embed web part, then click on add web part and search for embed.
But the embed web part does not allow us to provide an URL directly, if you will try it will show error as:
This website doesn’t support embedding using just the address. Try pasting the embed code instead. If it’s important to embed from this site using just the address, please send us feedback.
To fix the above error, instead of directly providing the URL, we need to generate the embed code like below:
You just need to provide the page URL in the src attribute like below:
<iframe src="https://www.spguides.com/" width="100%" height="500px"></iframe>
When you will add the embed code like above, it might show an error like below:
Embedding content from this website isn’t allowed, but your admin can change this setting. They will need to add ‘www.spguides.com’ to the list of sites that are allowed.
To fix the error, “Embedding content from this website isn’t allowed, but your admin can change this setting“, follow the below steps:
Open the SharePoint site setting page, Click on Settings icon -> Site Information -> View all site settings. Or you can access the site settings page directly from the URL.
Then click on “HTML Field Security” that is presented under “Site Collection Administration“.
In the HTML Field Security page, add your domain name like below and click on OK.
Now when you will add the embed code in the SharePoint Online modern site embed web part, it will display the page, no error will come.
This is how we can display a page in SharePoint online modern sites.
Link web part
Unlike SharePoint modern embed web part, by using the modern link web part, you can provide the link directly (external URLs also). But instead of displaying the page completely, it will display as a link.
This is another way, we can use the link web part to display a page in SharePoint Online modern site.
Watch a video tutorial on Page viewer web part in SharePoint. If you like our videos, Subscribe to EnjoySharePoint YouTube Channel.
SharePoint Page Viewer Web Part is an out-of-box web part provided by Microsoft. By using this web part you can show a web page, file, or folder on a SharePoint Page.
You can use the page viewer web part only in a browser that supports the HTML IFRAME element. And you can display a file or a folder in Internet Explorer. The Page Viewer Web Part displays content asynchronously from the rest of the page.
We can easily add a page viewer web part to a classic SharePoint web part page.
Note: In modern SharePoint pages, you can not add this page viewer web part. Know more about SharePoint Online modern experience.
To add page viewer web part in a page, Open SharePoint site and then Edit the page and then click on Add a Web Part. Then from the Web Part categories Select Media and Content. From the Media and Content Web Part categories select Page Viewer web part. Then click on Add.
Once you will add the web part now you can configure the web part by clicking on open the tool pane link on the web part. Once you will click on open the tool pane link, the Page Viewer properties dialog will open.
From the first section, you can choose from radio button list what you want to display like Web Page, Folder or File. Suppose you will select the Web Page, then in the Textbox put the URL of the webpage as shown in the figure below.
Now the Web Page will appear inside the Page Viewer web part. You can also set all the other properties for the web part like here I have changed for width and height.
The page looks like below:
Below is how it appears when I give a SharePoint Online document library URL.
If you are providing any SharePoint web page, file, or document library URL then you can use an absolute URL or a relative URL.
The linked content of the SharePoint Page Viewer Web Part is isolated from other content on the page by the HTML IFRAME element. The Page Viewer Web Part in SharePoint Online displays content asynchronously from the rest of the page. This means that you can view and use other Web Parts on the page if the link happens to take a long time to return the content.
This element ensures that any HTML elements that are displayed as content in the Page Viewer Web Part do not conflict with other HTML elements on the page.
Sometimes, when you add a page viewer web part in SharePoint Online, it will not render the content in the SharePoint web part page. If you are seeing a warning message like Only secure content is displayed at the button of the browser window, then you can follow the solution below.
Apart from this, you can check if “custom script” is enabled in the Office 365 SharePoint Online admin center. You can verify that from the SharePoint Online admin center Settings page like below:
If you are trying to give a file path inside a SharePoint Online page viewer web part like below, it might not work.
It will give an error like below:
The file name or path is not valid for the link property. Check the spelling and syntax, and then type it again.
You should give the file path like below in the page viewer web part in SharePoint Online.
Similarly, if you want to give the file path, which is there in a shared drive, you can give the path like below:
Sometimes, if you have added an external URL in SharePoint online page viewer web part, you may see a blank page on it. To solve the issue, you can open the SharePoint site settings page, click on HTML Field Security which is under Site Collection Administration.
Then in the “HTML Field Security” security page, make sure to choose radio button “Allow contributors to insert iframes from any domain“.
If you are facing an issue like “Only secure content is displayed” in SharePoint online page viewer web part or the page view web part shows a blank page or SharePoint online page viewer not working, then you can read the below articles to solve the issue:
Let us see, how to solve only secure content is displayed error that comes while using Page viewer web part in SharePoint Online/2013/2016.
Recently I was using the page viewer web part in SharePoint Online site. I was displaying a URL inside the page viewer web part. But in IE it was showing an error as Only secure content is displayed.
And once I click on Show all content. Then only it will show the content from the page viewer web part.
Only secure content is displayed SharePoint
Below are two solutions which you can try to solve only secure content is displayed the warning message.
Inside my SharePoint online page viewer web part, I was trying to show http://www.enjoysharepoint.com URL.
Since SharePoint online site is an HTTPS site and this one is an HTTP site. It was showing that warning message. The page viewer web part URL was like below:
When I change the URL to an “https” URL. It started showing the page without the warning message.
SharePoint page viewer only secure content is displayed
The other option is we can disable that warning message in the browser itself. Open Internet Explorer -> On the Tool menu, click Internet Options -> Click the Security tab and then click Custom level -> In the Settings box, scroll down to the Miscellaneous section, and under Display mixed content choose Enable.
It looks like below:
I hope this will be helpful to resolve the SharePoint page viewer only secure content is displayed warning message issue in IE.
There are also alternate ways to display content in a web part page without using a SharePoint page viewer web part.
In content editor web part or embed code web part, you can add the code like below:
<iframe id="iframe1" height="350" width="600" src="https://URL HERE"></iframe> <iframe src="https://URL HERE" width="600" height="350"></iframe>
You may also like following SharePoint tutorials:
- SharePoint Online Highlighted Content Web Part
- SharePoint Online quick chart web part
- How to enable script editor web part in SharePoint Online Office 365
- Embed Power BI report in SharePoint Online
- SharePoint online quick links web part – How to use
- Content query web part SharePoint Online or SharePoint 2013/2016
I hope this SharePoint tutorial will be helpful to know the Page Viewer web part in SharePoint Online/2019/2016/2013. We also saw how can we display a file or folder using a page viewer web part in SharePoint Online. SharePoint page viewer web part is really useful to display a page, file, or document.
It must solve the below queries:
- page viewer web part
- Page viewer web part sharepoint online modern
- page viewer web part sharepoint online
- sharepoint page viewer web part
- sharepoint online page viewer web part
- page viewer web part sharepoint online modern
- sharepoint online page viewer
- sharepoint page viewer web part not working
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com