• Resolved kustv

    (@kustv)


    Hello Frank,
    I have two questions:
    1. If I exclude a js file, can it still be minified(just not be put to the footer)?
    2. Regarding above the fold: I have tried using the site you mentioned to find out what css is needed above the fold, but it still broke the layout completely. Is there any other way and most importantly: How does this work if you have different pages and not only one?

    https://ww.wp.xz.cn/plugins/autoptimize/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Frank Goossens

    (@futtta)

    morning kustv;
    1. no, it’s just left alone.
    2a. alternative solution to find critical CSS; https://gist.github.com/PaulKinlan/6284142
    2b. you can use the API (the autoptimize_filter_css_defer_inline filter) to change the “above the fold”-CSS based on URL or on conditional tags (is_page, is_post, is_home, …)

    hope this helps,
    frank

    Thread Starter kustv

    (@kustv)

    Hello,
    thank you for your reply. If I have different critical css for each page, what would I put in the field for the critical css though?

    Plugin Author Frank Goossens

    (@futtta)

    Well … put the critical CSS for “most” requests in there and (if you’re into coding) use the API (using the autoptimize_filter_css_defer_inline filter) to differentiate between different requests and use other “above the fold” CSS there?

    frank

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Above the fold…again’ is closed to new replies.