SharePoint – HTTP 302 Cannot execute script as it was served with MIME type text/html instead of text/javascript

Ok, SharePoint is chaos. We all know it, we just don't talk about it too much.  If you run into this issue, try deleting and re-uploading the affected file first before checking anything else.

Advertisements

Using Fetch with SharePoint Online

jQuery's ajax method. If you aren't a fan of using SP.RequestExecutor, chances are good that $.ajax is used heavily to query and post data to SharePoint's REST API in your SharePoint customisations. There's nothing wrong with jQuery's $.ajax method. In fact, it's been incredibly reliable over the past five years for my work. But we … Continue reading Using Fetch with SharePoint Online

SharePoint Anonymous Access REST API authentication prompt on Mobile Devices

Recently I had the displeasure of tackling an obscure issue; On a public facing, anonymous access enabled SharePoint 2013 website, some mobile devices were receiving an authentication prompt when the following REST API call was made against a Document Library. https://gist.github.com/davehax/0e3f2cff3ab041388d6775e41eda1709 Above is just a small snippet, but the dreaded authentication prompt would pop up when the … Continue reading SharePoint Anonymous Access REST API authentication prompt on Mobile Devices

Fixing janky scrolling in SharePoint on iOS Safari

Safari, iOS, SharePoint??? Well! You know, sometimes projects just work out this way. What can you do? Now Safari on iOS is soooo bloody janky when scrolling on the page. Here's how to fix that! Use: #s4-workspace { -webkit-overflow-scrolling: touch; /* lets it scroll lazy */ } https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling

Cloning A Site Collection In The Same Farm

The most reliable way to clone a Site Collection in the same SharePoint Farm is to use the Backup-SPSite and Restore-SPSite commands through PowerShell or the SharePoint Management Console. The following scenario has been tested on the same farm: Backup a single site collection from Web Application A & Content Database A Restore the backed up site … Continue reading Cloning A Site Collection In The Same Farm