Make WordPress Core


Ignore:
Timestamp:
10/21/2025 08:45:33 AM (3 weeks ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r61008 r61013  
    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      *
    3064      * @param int $total_inline_limit The file-size threshold, in bytes. Default 20000.
     3063     * @since 6.9.0 The default limit increased from 20K to 50K.
     3064     *
     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 );
Note: See TracChangeset for help on using the changeset viewer.