Pages

Monday, March 20, 2017

SharePoint Upload.aspx page freezes when page loads

Recently, I had an issue at a client site where the upload page in any document library would hang a little when opening in IE. There wasn't any issue in Chrome. This issue also wasn't occurring on all workstations, just a few. I knew it had to probably be an Office configuration, but group policy was preventing me from seeing any IE configurations. After diving into the source code of the upload.aspx page, I could see that the page was trying to load an ActiveX control, STSUpld.UploadCtl if the browser version was IE 5 and up. Upon investigation, the different workstations had different versions of this IE Add-on (from IE go to tools->Manage add-ons).

Chrome would skip the loading of the active x object. Therefore, after some head-banging, I decided to update the master page and add the following script to prevent creating the activex object. The script checks that the page is the upload.aspx and if it is, it sets browseris.ie5up to false to continue through the script. It's not a great fix, because it would have to be applied to all the master pages, however this would help appease users until the issue could be resolved by the IT team.





<script type="text/javascript"> 
//added this script because for some users, the upload page would freeze. an activex control on the upload page is loaded for IE5 and up. we set this to be false here so that active x control is not created
if( window.location.href.toLowerCase().indexOf("/_layouts/upload.aspx") >= 0 )
{
if (typeof browseris !== 'undefined') {
//browseris.ie = false;
browseris.ie5up = false;
}
}
</script>