diff --git a/advanced/server/public/index.html b/advanced/server/public/index.html
index 4622d2a..c2b5f2a 100644
--- a/advanced/server/public/index.html
+++ b/advanced/server/public/index.html
@@ -18,10 +18,6 @@
-
-
@@ -31,6 +27,9 @@
app.ports.storeSession.subscribe(function(session) {
localStorage.session = session;
+
+ // Report that the new session was stored succesfully.
+ setTimeout(function() { app.ports.onSessionChange.send(session); }, 0);
});
window.addEventListener("storage", function(event) {
diff --git a/intro/server/public/index.html b/intro/server/public/index.html
index 4622d2a..c2b5f2a 100644
--- a/intro/server/public/index.html
+++ b/intro/server/public/index.html
@@ -18,10 +18,6 @@
-
-
@@ -31,6 +27,9 @@
app.ports.storeSession.subscribe(function(session) {
localStorage.session = session;
+
+ // Report that the new session was stored succesfully.
+ setTimeout(function() { app.ports.onSessionChange.send(session); }, 0);
});
window.addEventListener("storage", function(event) {