From 66bcf07e7f465daa09ac549045f16c34f9f0c324 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Thu, 18 Jan 2024 15:54:35 +0100 Subject: [PATCH] Warn when generating HTML with large baked statefile --- src/notebook/Export.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/notebook/Export.jl b/src/notebook/Export.jl index e05186b4b9..3a3bc64dec 100644 --- a/src/notebook/Export.jl +++ b/src/notebook/Export.jl @@ -99,6 +99,8 @@ function generate_html(; cdnified = cdnified_editor_html(; version, pluto_cdn_root) + length(statefile_js) > 32000000 && @error "Statefile embedded in HTML is very large. The file can be opened with Chrome and Safari, but probably not with Firefox. If you are using PlutoSliderServer to generate this file, then we recommend the setting `baked_statefile=false`. If you are not using PlutoSliderServer, then consider reducing the size of figures and output in the notebook." length(statefile_js) + parameters = """