diff --git a/dev/js/src/api.js b/dev/js/src/api.js
index 75a4e68..cfc0625 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -107,7 +107,15 @@
   	let url  =  KorAP.URL + "/corpus?cq=" + encodeURIComponent(cq);
   	KorAP.API.getJSON(url, cb, "CorpusInfo: " + cq);
   };
-  
+
+
+  /**
+   * Retrieve a list of all plugin objects to
+   * establish in the frontend.
+   */
+  KorAP.API.getPluginList = function (url, cb) {
+    KorAP.API.getJSON(url, cb, "Plugin-List")
+  };
 
   /**
    * General method to retrieve JSON information
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index ef6dfcf..4f6074f 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -436,28 +436,35 @@
     /**
      * Initialize Plugin registry.
      */
-    let p = KorAP.Plugins;
-    if (p && p.length > 0) {
-      // Load Plugin Server first
-      KorAP.Plugin = pluginClass.create();
+    let pe;
+    if (pe = d.getElementById("kalamar-plugins")) {
+      let url = pe.getAttribute('data-plugins');
+      if (url !== undefined) {
+        KorAP.API.getPluginList(url, function (json) {
+          if (json && json.length > 0) {
+            // Load Plugin Server first
+            KorAP.Plugin = pluginClass.create();
 
-      // Add services container to head
-      d.head.appendChild(KorAP.Plugin.element());
+            // Add services container to head
+            d.head.appendChild(KorAP.Plugin.element());
 
-      // Add pipe form
-      KorAP.Pipe = pipeClass.create();
-      d.getElementById("searchform").appendChild(KorAP.Pipe.element());
-
-      try {
-      
-        // Register all plugins
-        p.forEach(i => KorAP.Plugin.register(i));
-      }
-      catch (e) {
-        KorAP.log(0, e);
-      }
+            // Add pipe form
+            KorAP.Pipe = pipeClass.create();
+            d.getElementById("searchform").appendChild(KorAP.Pipe.element());
+            
+            try {
+              
+              // Register all plugins
+              json.forEach(i => KorAP.Plugin.register(i));
+            }
+            catch (e) {
+              KorAP.log(0, e);
+            }
+          }
+        });
+      };
     };
-
+      
     return obj;
   });
   
