Permalink
Browse files

Drop support for appcache

Apart from the browsers nagging about switching to service workers,
having this wasn't all that useful. The speed boost of having
locally-cached files wasn't a reliable benefit. Offline functionality
isn't otherwise that useful for this application.
  • Loading branch information...
lovett committed Nov 17, 2018
1 parent 0bd8505 commit 59a51bee0e6dae51cb62e7c0c9328e30c8b37314
Showing with 1 addition and 105 deletions.
  1. +0 −17 app/directives.ts
  2. +0 −13 build/views/appCache.ejs
  3. +1 −1 build/views/index.ejs
  4. +0 −54 server/routes/appcache.ts
  5. +0 −3 server/server.ts
  6. +0 −17 tests/appcache-spec.js
@@ -209,23 +209,6 @@ appDirectives.directive('notifierOfflineEvent', ['$window', '$rootScope', ($wind
};
}]);

appDirectives.directive('notifierAppcacheReload', ['$window', ($window) => {
return {
link(_: ng.IScope, element) {
if (!$window.hasOwnProperty('applicationCache')) {
element.addClass('appcache-nope');
return;
}

$window.applicationCache.addEventListener('updateready', () => {
$window.location.reload();
});
},

restrict: 'A',
};
}]);

appDirectives.directive('notifierStatusBar', ['MessageList', ( MessageList) => {
function messageCount() {
const count = MessageList.count();

This file was deleted.

Oops, something went wrong.
@@ -1,5 +1,5 @@
<!doctype html>
<html manifest="notifier.appcache" ng-app="appModule" lang="en" ng-csp notifier-appcache-reload notifier-offline-event>
<html ng-app="appModule" lang="en" ng-csp notifier-appcache-reload notifier-offline-event>
<head>
<title><%= title %></title>
<base href="<%= base_href %>" />

This file was deleted.

Oops, something went wrong.
@@ -12,7 +12,6 @@ import * as Sequelize from 'sequelize';
import Message from './models/Message';
import Token from './models/Token';
import User from './models/User';
import appCache from './routes/appcache';
import archive from './routes/archive';
import asset from './middleware/asset';
import auth from './routes/auth';
@@ -167,8 +166,6 @@ router.use(asset(nconf.get('NOTIFIER_PUBLIC_DIR')));

router.use(/^\/(login|logout)?$/, index);

router.use('/notifier.appcache', appCache);

router.use('/robots.txt', robots);

router.use('/status', status);

This file was deleted.

Oops, something went wrong.

0 comments on commit 59a51be

Please sign in to comment.