Developing JavaScript solutions with remote data using Chrome

When developing simple JavaScript applications using data i.e. from a SharePoint site using SPservices, then you will be challenged with warnings about cross-site scripting if you try to create the files locally on your own machine before publishing the files to SharePoint.

This is usually a good thing and is meant to keep browser users safe, but what if you just want to develop a simple html page with some JavaScript locally with intentions of later uploading the files to a SharePoint document library to run it from there. Then it could be nice to use live data and avoid having to install SharePoint locally just to test with.

Here comes Google Chrome to the rescue. When starting Google Chrome you can start it with a flag called --disable-web-security (which is asking for problems under normal circumstances)

I.e. you can create a shortcut like this


When Chrome is started, you will see this warning indicating that you are on your own, but it really simplifies development using SharePoint resources.

Comments are closed