• Resolved michelgreenwood

    (@michelgreenwood)


    Hi,

    Is there a way to prevent custom css from creating an extra style sheet if there are over 2000 characters. I don’t see the benefit of that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    It’s built that way for performance purposes. Above a certain size, adding styles inline hurts the performance of your site.

    However, when you add the CSS via a separate request, the browser caches it. As a result, when your readers load another page on your site, they benefit from the cached version instead of having to load the inline CSS again in the HTML.

    There is no option to disable this feature but you could manually remove Jetpack’s action via a functionality plugin like this one, and thanks to the remove_action() function.

    You can check how the feature was added here:
    https://github.com/Automattic/jetpack/pull/5974/files

    Thread Starter michelgreenwood

    (@michelgreenwood)

    Thanks for the explanation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘prevent custom css from creating an extra ccs’ is closed to new replies.