I'd like to build a Microsoft Office 2016 Add-in that could be used off-line (at least after being used online once).
I understand that we could cache HTML, js, etc. like a normal browser and I had thought of using a local HTTP server (not distributed with the Add-in) so the plugin could communicate with it. But doing things like:
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "http://localhost:8080", true);
xmlHttp.onreadystatechange = function(aEvt) {
if (xmlHttp.status == 200) {
console.log(xmlHttp.responseText);
} else {
console.log("Status:" + xmlHttp.statusText);
}
};
xmlHttp.send();
This fails with:
JavaScript runtime error: Access is denied.
If I used an HTTPS URL (to a proper server) it works.
I think that the Add-ins only allow HTTPS and not HTTP requests?
What would be the best way to communicate, not via HTTPS external on the Internet, an Office 2016 add-in with another process in the machine?
Is it possible to relax the security on the manifest (I haven't found how) and allow HTTP requests to localhost
?