diff --git a/app/templates/admin/user.html.j2 b/app/templates/admin/user.html.j2
index 76b3e509..15de85da 100644
--- a/app/templates/admin/user.html.j2
+++ b/app/templates/admin/user.html.j2
@@ -101,8 +101,9 @@
{% endblock %}
diff --git a/app/templates/corpora/corpus.html.j2 b/app/templates/corpora/corpus.html.j2
index da98f706..3e0effb7 100644
--- a/app/templates/corpora/corpus.html.j2
+++ b/app/templates/corpora/corpus.html.j2
@@ -186,7 +186,9 @@
var informationUpdater = new InformationUpdater({{ corpus.id }}, false);
{% else %}
var informationUpdater = new InformationUpdater({{ corpus.id }}, true);
- nopaque.socket.emit('subscribe_foreign_user_ressources', {{ corpus.user_id }});
+ document.addEventListener("DOMContentLoaded", () => {
+ nopaque.socket.emit("subscribe_foreign_user_ressources", {{ corpus.user_id }});
+ });
{% endif %}
{% endblock %}
diff --git a/app/templates/jobs/job.html.j2 b/app/templates/jobs/job.html.j2
index 63a1874e..bd0e7086 100644
--- a/app/templates/jobs/job.html.j2
+++ b/app/templates/jobs/job.html.j2
@@ -259,7 +259,9 @@
var informationUpdater = new InformationUpdater({{ job.id }}, false);
{% else %}
var informationUpdater = new InformationUpdater({{ job.id }}, true);
- nopaque.socket.emit('foreign_user_ressources_init', {{ job.user_id }});
+ document.addEventListener("DOMContentLoaded", () => {
+ nopaque.socket.emit("foreign_user_ressources_init", {{ job.user_id }});
+ });
{% endif %}
{% endblock %}