Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Google Page Speed issue after removing header banner image of...

Discussion in 'Misc WordPress Requests' started by bcworkz, Apr 4, 2018.

  1. bcworkz

    Guest

    Reply To: Google Page Speed issue after removing header banner image of Twenty Seventeen, by bcworkz

    If there is no functional CSS in a file, it should be dequeued so that it is not even loaded. Many plugins arbitrarily enqueue their styles and scripts on every page because they have no way of knowing when their resources might be needed. To optimize particular pages, dequeue any styles and scripts not needed on a particular page. This can be done by hooking “wp_enqueue_scripts” action with a very late priority. Check the return of get_queried_object_id() against an array of ID values which determine whether to dequeue the needless scripts and styles or not.

    Most scripts can be enqueued in the footer. If they are not already in the footer, and are used on the page, try enqueuing in the footer. CSS that is solely for below the fold content can also be loaded in the footer. The fewer files loaded in head, the better. Where reasonable, converting external files to inline script or style will help.

    Optimizing and caching plugins can be beneficial, but they are rarely plug and play. Their settings need to be tuned in order to get the most out of them without corrupting your pages.

    Reply To: Google Page Speed issue after removing header banner image of Twenty Seventeen
     
    #1

Share This Page

Monarch Social Sharing Plugin