WordPress.org

Forums

Autoptimize
[resolved] make style sheet inline (9 posts)

  1. Hamed.T
    Member
    Posted 1 year ago #

    some themes have a small style sheet and i think it's can be great to make them inline and place it in header or even footer.
    it's help to eliminate render-blocking CSS in above-the-fold content.
    thanks in advance

    http://wordpress.org/plugins/autoptimize/

  2. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    Ah, but that can easily be accomplished Hamed; either put the inline css between noptimize-tags or add a unique string (one that is only in that block of css) to the "exclude CSS from autoptimization"-field in the admin page.

  3. Hamed.T
    Member
    Posted 1 year ago #

    i mean autoptimize grab the style.css file export styles compress it and make it inline.
    there is simple ways to do it like copy styles and compress it then paste it...
    but i prefer to do it with simply one click.
    like this: picture
    i use three plugin to do what i want, before this i just use autoptimize and now i use:
    1. autoptimize
    2. Images URL Rewrite for CDN
    3. Async JS and CSS

  4. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm ... I'll put this on my list of things to investigate, but I'm not sure about this one; although this theoretically will lead to a better mobile pagespeed score, it is bound to, in reality, slow things down as you're including the CSS in each and every page requested (which is a serious overhead). I'll keep you posted on what I come up with as conclusion :-)

  5. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    I've been doing some tests, chances are inline CSS will be in one of the following releases after all.

  6. Hamed.T
    Member
    Posted 1 year ago #

    you're awesome frank

  7. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    OK, 1.8.0-test has just been published, looking forward to your feedback!

  8. Hamed.T
    Member
    Posted 1 year ago #

    frank if i have a inline css like:
    <s tyle>
    whatever
    < /s tyle>
    and a < link rel=" style sheet" href= "stuff. css / >

    did new feature combine this to one inline style?

  9. Frank Goossens
    Member
    Plugin Author

    Posted 1 year ago #

    yes, all CS is aggregated the same way as before, only difference being the place where the autoptimized CSS is located (inline vs in external stylesheets).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Autoptimize
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags