diff --git a/templates/home.html b/templates/home.html
index 40280eb3ff0e4558399ed2f663162a8c3a5f815b..5057b6d653280f524726bff5706dabf3ab0ab0be 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -7,7 +7,9 @@
          <title>URL shorter</title>
          <script src="/static/external/jquery/jquery.js"></script>
          <script src="/static/jquery-ui.js"></script>
+         {% if cookieNotice %}
          <script src="/static/cookie.js"></script>
+         {% endif %}
          {% if recaptchaPublicKey %}
             <script src="https://www.google.com/recaptcha/api.js" async defer></script>
             <script>