SharePoint Online document library aspx pages asking to save not opening in browser

Recently we have uploaded an aspx page inside the site assets document library in SharePoint Online site. When we click on the aspx page, instead of opening in the browser it asks for saving the document.

Our requirement is the file should be open in the browser, it should not ask to save the file.

We have also checked “Opening Documents in the Browser” settings in the library settings which was already set as “Use the server default (Open in the browser)”. That we can check in library settings -> Advanced settings and in the advanced settings page you can see “Opening Documents in the Browser”.

You can see the fig below:

SharePoint online aspx pages not opening in browser
SharePoint online aspx pages not opening in browser

But still the aspx page was asking to save instead of opening in the browser.

When we upload the aspx page, we use the drag and drop feature of SharePoint to upload the aspx page. Then to resolve the issue, we click on the Upload button and then browse the file and then we upload the document.

Check out the below pic how we upload the document instead of drag and drop and it worked well.

Aspx pages not opening in browser in SharePoint online document library
Aspx pages not opening in browser in SharePoint online document library

You may like following SharePoint tutorial:

Hope this will be helpful.

>