SharePoint Saturday Boston 2016 Follow Up

Thanks to everyone who attended my session at SharePoint Saturday Boston on ‘Best Practices for Small-Scale Client-Side Development in SharePoint’. I’ve posted my slides on SlideShare for everyone’s enjoyment.

Be sure to follow my series on Sympraxis Client Side Development Pipeline for more details on some of the approaches and methods I demonstrated in the session.

Thanks to Heather Newman for the photo!

Thanks to Heather Newman for the photo!


Arctic SharePoint Challenge 2015 Notes – Part 2

A few weeks ago I posted from the Arctic SharePoint Challenge in Oslo, Norway. Now that I’ve been home for a while, I *still* think it was a really cool thing to have the chance to attend. I was flattered to be asked to give a keynote on the first day and to act as a jurist (or judge – depending on who was talking) for the event.

Here I am with the other judges (from Left) :Christian Nesmark, Harald Fianbakken, and Chris Givens. We only had one robe.


I wanted to post the links to each team’s repository, if only to save them for my own use down the road. The stuff these folks came up with was truly impressive!

You can read the narratives behind the code on the blog where each team posted their progress and requests for the valuable badges.


Arctic SharePoint Challenge 2015 Notes – Part 1

I’m in Oslo at the 5th annual Arctic SharePoint Challenge. This is quite an event. As far as I know, it’s the only hackathon focused purely on SharePoint in the world.

A few stats:

There are also Internet-connected red buttons, a star system map with live Tie Fighter positioning updates, more Web services than you can shake an alien from Alderaan’s finger at, one lynx named Dexter, and so much more I couldn’t possibly list it all. As you can tell from the logo, the theme this year is Star Wars, and everyone is taking it to an extreme in the best possible ways.


Check out the live blogging that’s going on, the leaderboard so far (new badges soon!), and all of the badges teams can get.

I was honored to be invited to be a judge on the jury as well as to give the opening keynote presentation. I decided to talk about Building JavaScript to Stand the Test of Time. Here’s the presentation on SlideShare.

Thanks to our sponsors!

Synchronous XMLHttpRequest Warning with SPServices and Recent Browsers

If you’re working in the latest versions of Chrome (~40+) – and maybe Firefox – and you use SPServices, you may start to see an warning:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check

Vigilant SPServices user frankhale reported this to me the other day in the SPServices discussions on Codeplex, which is – at least at the moment – the best place to get help with SPServices. You can also add an issue on Github (sympmarc / SPServices) if that’s your fancy.

The warning is thrown in jQuery, not SPServices, but it’s an SPServices issue.

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience.

First off, it’s a warning, not an error. Your code will continue to work in the near term, at least.

Because of some backward compatibility concerns, I’ve left a few synchronous calls internally to SPServices in place. Those calls are what are causing the warning. In particular, it is most likely that the warning is being thrown for you because of a synchronous call on the $().SPServices.SPGetCurrentSite function. The reason for this is that early in the SharePoint 2007 days it was difficult to determine the current site without a call to the Webs.WebUrlFromPageUrl operation. Unfortunately, it seems that I’m making that call in SharePoint 2010 and 2013, even though the current site is available in JavaScript variables.

So, the bottom line is: “Carry on.” I’ll get a fix into the next release of SPServices for this. In the meantime you should be fine.

Calculate How Much Web Storage You’re Using

This is a quick one, but it’ll be a post I return to over and over again.

When you use Web storage (a.k.a. DOM storage) – localStorage or sessionStorage – to cache data, you’ll often want to know how much you’ve used already. Each browser gives you a different amount of storage to work with, and you don’t want to run out for no good reason.

You might be surprised what the sites you visit are up to these days. Cookies are old hat; they just don’t give us enough to work with, as they are capped at 4k of data each.

From Wikipedia:

Web storage provides far greater storage capacity (5 MB per origin in Google Chrome, Mozilla Firefox, and Opera; 10 MB per storage area in Internet Explorer; 25MB per origin on BlackBerry 10 devices) compared to 4 kB (around 1000 times less space) available to cookies.

If you need to know how long each browser has offered Web storage, check out the Web storage page on Can I use. If you’d like to understand Web storage in a more practical sense, check out my post Caching SharePoint Data Locally with SPServices and HTML5’s Web Storage.

I’ve adapted some JavaScript I found out in a post on StackOverflow to display the storage used by each object in both localStorage and sessionStorage for the current origin

var storageTypes = ["localStorage", "sessionStorage"];
var x, log = [], total = 0;

for(var i=0; i < storageTypes.length; i++) {
	var thisStorage = window[storageTypes[i]];
	log.push("Statistics for " + storageTypes[i]);
	for (x in thisStorage) {
		log.push(x + " = " + ((thisStorage[x].length * 2) / 1024).toFixed(2) + "KB / " + ((thisStorage[x].length * 2) / 1024 / 1024).toFixed(2) + "MB");
		total += thisStorage[x].length * 2;
	log.push("Total = " + (total / 1024).toFixed(2) + "KB / " + (total / 1024 / 1024).toFixed(2) + "MB");
	total = 0;

The results will look something like those below, which I got by running the code in a console while I was on a Yammer external network.

Here are the results on the home page of my Office365 tenant: