[Resolved] Performance on mobile

Home Forums Support Performance on mobile

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1061658
    Bernhard

    Hi there,
    I try to improve performance on mobile and try to figure how to proceed.
    I made a test with darebust.com report
    The first thing I see it is loading images in the sidebar, but the sidebar is hidden with the code

    @media (max-width: 768px) {
        #right-sidebar {
            display: none;
        }
    }

    How can I avoid that it is still loading these resources?

    Then I see a lot more items in the report and I’m wondering, how relevant they are.
    For example, the duplicate menu items, is this because I created a backup of the menus or is it another problem?
    I see some items which probably will need coding. Then it complains, that instead of the wpfastest cache file I shall group some scripts in one or more distinct files. This is quite confusing for me.

    It would be very helpful if you could give me some suggestions how to proceed.

    Thank you

    #1062038
    David
    Staff
    Customer Support

    Hi there,

    tricky one with the sidebar, you can try this PHP snippet that uses the wp_is_mobile() function to detect the site is being viewed on a mobile device and removes the sidebar

    add_filter( 'generate_sidebar_layout','db_remove_mobile_sidebar' );
    function db_remove_mobile_sidebar( $layout )
    {
     	// If we are viewing on mobile device remove sidebar
     	if ( wp_is_mobile() )
     	 	return 'no-sidebar';
    
     	// Or else, set the regular layout
     	return $layout;
    
     }

    Duplicate menus are not something you can avoid when using the mobile header or slideout panels.

    #1062128
    Bernhard

    Perfect, problem solved.

    One more question: Do you have experience with CloudFlare Plus – Faster Mobile Speed? Makes it sense to use it with GPP?

    #1062339
    David
    Staff
    Customer Support

    I personally don’t use Cloudflare – rarely do i have the need for CDN as most sites i work are served to the local audience. If you have a global audience then its worth considering.

    #1062388
    Bernhard

    Thank you 🙂

    #1062446
    David
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.