diff --git a/taipy/gui/server.py b/taipy/gui/server.py index d9d333fb29..697f1f52c0 100644 --- a/taipy/gui/server.py +++ b/taipy/gui/server.py @@ -30,6 +30,7 @@ jsonify, make_response, render_template, + render_template_string, request, send_from_directory, ) @@ -169,9 +170,8 @@ def my_index(path): if resource_handler_id is not None: resource_handler = _ExternalResourceHandlerManager().get(resource_handler_id) if resource_handler is None: - response = make_response( - "Cookie was deleted due to invalid resource handler id. Please restart the page manually.", 400 - ) + reload_html = "" # noqa: E501 + response = make_response(render_template_string(reload_html), 400) response.set_cookie( _Server._RESOURCE_HANDLER_ARG, "", secure=request.is_secure, httponly=True, expires=0, path="/" )