Visual Studio 2017 fails to install offline with “Unable to download installation files”

It worked!! All I had to do was install the certificates into the root CA! Something I missed noticing in the VS 2017 docs: How to install from the offline installation folder Install the certificates (They are in the “certificates” folder, which is in your Layout folder. ) Simply right-click each one and choose Install … Read more

How to check if the user is online using javascript or any library?

I just got this bit of code functionality from a Mozilla Site: window.addEventListener(‘load’, function(e) { if (navigator.onLine) { console.log(‘We\’re online!’); } else { console.log(‘We\’re offline…’); } }, false); window.addEventListener(‘online’, function(e) { console.log(‘And we\’re back :).’); }, false); window.addEventListener(‘offline’, function(e) { console.log(‘Connection is down.’); }, false); They even have a link to see it working. I … Read more

Best practices for detecting offline state in a service worker

navigator.onLine and the related events can be useful when you want to update your UI to indicate that you’re offline and, for instance, only show content that exists in a cache. But I’d avoid writing service worker logic that relies on checking navigator.onLine. Instead, attempt to make a fetch() unconditionally, and if it fails, provide … Read more

Detect if the internet connection is offline?

Almost all major browsers now support the window.navigator.onLine property, and the corresponding online and offline window events. Run the following code snippet to test it: console.log(‘Initially ‘ + (window.navigator.onLine ? ‘on’ : ‘off’) + ‘line’); window.addEventListener(‘online’, () => console.log(‘Became online’)); window.addEventListener(‘offline’, () => console.log(‘Became offline’)); document.getElementById(‘statusCheck’).addEventListener(‘click’, () => console.log(‘window.navigator.onLine is ‘ + window.navigator.onLine)); <button id=”statusCheck”>Click … Read more

Backbone.js able to do rest and localstorage?

Backbone.localStorage is an external file you can use which overwrites Backbone.Sync. You can use simple feature detection for whether the user is offline or online and then asynchronously load Backbone.localStorage.js if they are offline. If neccesary you can also pass in a specific version of Backbone.sync to your models and collections. If you want to … Read more