Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui.Load fails with large contents #144

Open
jeffssh opened this issue Mar 31, 2021 · 1 comment
Open

ui.Load fails with large contents #144

jeffssh opened this issue Mar 31, 2021 · 1 comment

Comments

@jeffssh
Copy link

jeffssh commented Mar 31, 2021

ui.Load fails without returning an error when loading large data strings. I'm currently building a vue.js app and inserting all js/css inline. I embed the single html file in the go bin using The single html file runs fine in a browser, but can't be loaded by ui.Load as a data string and no error is returned. The resulting window contains no content, the title of the app indicates the entire data string loaded is <html></html>

image

The full string is logged to console so it's being loaded and passed to ui.Load correctly.

image

The failing code can be downloaded and run with go get github.com/jeffssh/gex
The single html file is available here: https://github.com/jeffssh/gex/blob/main/app/dist/build.html

This entire setup has worked in the past, after only making changes to the vue.js portion of things, and being able to successfully run the single html file, the process broke.

@phanirithvij
Copy link

phanirithvij commented Jul 24, 2021

@jeffssh It is because chrome url max length is 2MB and your file is now 2.23MB

https://stackoverflow.com/a/25383986/8608146

I think you should serve over HTTP like in the counter example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants