Skip to content

Commit 2077aa2

Browse files
committed
Script Loader: Increase styles_inline_size_limit from 20K to 50K.
Benchmarking of initial page loads versus repeat page loads shows there is a greater performance improvement to increase inlining versus the benefits of relying on browser cache. This new limit is expected to be further refined during beta based on additional testing. Props westonruter, sabernhardt, poena, aristath, spacedmonkey, adamsilverstein, jonoaldersonwp, peterwilsoncc. See #63007. Fixes #63018. git-svn-id: https://develop.svn.wordpress.org/trunk@61013 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3569155 commit 2077aa2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/wp-includes/script-loader.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3055,13 +3055,14 @@ function wp_print_inline_script_tag( $data, $attributes = array() ) {
30553055
function wp_maybe_inline_styles() {
30563056
global $wp_styles;
30573057

3058-
$total_inline_limit = 20000;
3058+
$total_inline_limit = 50000;
30593059
/**
30603060
* The maximum size of inlined styles in bytes.
30613061
*
30623062
* @since 5.8.0
3063+
* @since 6.9.0 The default limit increased from 20K to 50K.
30633064
*
3064-
* @param int $total_inline_limit The file-size threshold, in bytes. Default 20000.
3065+
* @param int $total_inline_limit The file-size threshold, in bytes. Default 50000.
30653066
*/
30663067
$total_inline_limit = apply_filters( 'styles_inline_size_limit', $total_inline_limit );
30673068

0 commit comments

Comments
 (0)