-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
refactor handling of max size for html/js/css #525
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
ikreymer
commented
Apr 2, 2024
•
edited
edited
- due to a typo (and lack of type-checking!) incorrectly passed in matchFetchSize instead of maxFetchSize, resulting in text/css/js for >5MB instead of >25MB not properly streamed back to the browser
- add type checking to AsyncFetcherOptions to avoid this in the future.
- refactor to avoid checking size altogether for 'essential resources', html(document), js and css, instead always fetch them fully and continue in the browser. Only apply rewriting if <25MB.
- fixes Website fails to fully load properly since 1.0.0 #522
- due to a typo (and lack of type-checking!) incorrectly passed in matchFetchSize instead of maxFetchSize, resulting in text/css/js for >5MB instead of >25MB not properly streamed back to the browser - add type checking to AsyncFetcherOptions to avoid this - raise the text size to 50MB instead of 25MB just in case - fixes #522
tw4l
approved these changes
Apr 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch and thanks for the typing improvements!
tw4l
reviewed
Apr 2, 2024
Confirmed it resolves the issue with the example in #522. I'd recommend setting a |
ikreymer
commented
Apr 2, 2024
- always fetch 'essential resources', html/js/css into memory, regardless of size/even if size is unknown - only attempt rewriting if size <25MB - warn if large non-essential resource is not being streamed back to browser (due to size)
…a document, script or stylesheet, always load w/o streaming, for others, check size.
ikreymer
changed the title
fix check for max size for data streamed back to browser:
refactor handling of max size for html/js/css
Apr 3, 2024
Changes make sense and tested that it's still working well with example site now. Looks good to merge to me. |
tw4l
approved these changes
Apr 3, 2024
ikreymer
added a commit
that referenced
this pull request
Apr 4, 2024
refactor handling of max size for html/js/css (copy of #525) - due to a typo (and lack of type-checking!) incorrectly passed in matchFetchSize instead of maxFetchSize, resulting in text/css/js for >5MB instead of >25MB not properly streamed back to the browser - add type checking to AsyncFetcherOptions to avoid this in the future. - refactor to avoid checking size altogether for 'essential resources', html(document), js and css, instead always fetch them fully and continue in the browser. Only apply rewriting if <25MB. fixes #522
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.