Tuesday, February 1, 2011

HTML Files do not open in browser in SP 2010

Hi All,

Well I was working on one simple jQuery stuff and though of putting it in a simple HTML page and though that I would redirect user to the HTML page to view it.

Well, when I did that, it asked me to save the file, not opened in browser. In MOSS 2007, this would be no problem at all because we can open the html file in browser in that version. But it seems that there is bit restriction in new version of SharePoint.

They have tightened up the security for people who have contribute permission. Smart people can inject some stuff from HTML pages in the SharePoint and can harm server. To avoid this possibility, now in SP 2010 we cannot simply open HTML files in browser.

Even if you try to use page viewer web part and try to point to HTML file. It will still ask you to save now render in the web part.

There is a way to this restriction and that is to change setting in Web Application for "Browser File Handling" from Strict (default) to Permissive from central administration.

This might help you.


Parth Patel said...

wow...that will help a lot to everyone

Anonymous said...


There is a better way to handle "Browser File Handle" issue. Take a look at my blog here: http://www.pdfsharepoint.com/sharepoint-2010-and-pdf-integration-series-part-1/

Solution #2 addresses Pdf extension without exposing entire Web Application to "Permissive" browsing. Setting "Browsing File Handle" to "permissive" opens too many vulnerabilities with other file extensions.



SharePoint Kings said...

Hi divahno,

Thanks for sharing this.
solution #2 is defiantly a very good way to allow a particular file type.

we will soon update our post accordingly with link reference.

Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com