Mobile pages is very slow

Hello,

I started using CF yesterday.

On my semi-dedicated hosting I had PageSpeed Insights score 80-90 for mobile pages.
I use Newspaper theme with specific mobile theme.
Now I have PSI 50.

METRICS
First Contentful Paint
1.8 s
Time to Interactive
8.9 s
Speed Index
4.1 s
Total Blocking Time
770 ms
Largest Contentful Paint
4.8 s
Cumulative Layout Shift
0.002

In PSI test I see that mobile page is properly rendered.

I tried CF Mirage but it does not help.

On server side I use Litespeed cache that proved to be very good and it caches separate version for mobile requests.

I do use AMP pages but that is only for visitors coming from Google searches.

Not to mention that i get for desktop version in PSI test:
“Lighthouse returned error: FAILED_DOCUMENT_REQUEST. Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: net::ERR_TIMED_OUT)”

This is really bad. I don’t know when I got something like that.

I am not an IT expert but I did manage to get PSI on hosting for mobile pages around 90 and for desktop pages 90-97.

Any suggestion?

Thank you

Do you have mobile redirect enabled?

https://support.cloudflare.com/hc/en-us/articles/200168336-Understanding-Cloudflare-Mobile-Redirect

Thank you for suggestion.

No I don’t have it enabled since mobile version is not on other subdomain.
Litespeed cache has option “Cache Mobile” and it serves a separate cache copy for mobile visitors.
https://docs.litespeedtech.com/lscache/lscwp/cache/#cache-mobile

I turned off APO but site is still very slow. Both desktop and mobile pages.
Without CF my pages used to fly. Only reason I use CF if for protection since site was clicked bombed.

I turned-off APO and things looks better now in my browser at least but on https://pagespeed.web.dev/ I still get 50 for mobile page and for desktop page I get lower score.

For desktop page I even get

Oops! Something went wrong.
Lighthouse returned error: FAILED_DOCUMENT_REQUEST. Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: net::ERR_TIMED_OUT)

I have done hundreds of tests in last copule of months and never had problems like that.

It seems that Google ads are the problem for mobile page:

Google/Doubleclick Ads
301 KiB
1,930 ms
/pagead/ads?client=…(googleads.g.doubleclick.net)
29 KiB
673 ms
…m202…/show_ads_impl_with_ama_fy2019.js?client=…(pagead2.googlesyndication.com)
98 KiB
472 ms
…224/runner.html(tpc.googlesyndication.com)
6 KiB
340 ms
…current/rx_lidar.js?cache=r20110914(www.googletagservices.com)
37 KiB
186 ms
/bg/Ydwwnsiz0….js(pagead2.googlesyndication.com)
14 KiB
135 ms

What I don’t understand is how it was not problem before I started using CF.
I have few optimization regarding ad loading.

For me this is disaster. I am aware that Pagespeed test is just lab test but I didn’t have problems with it before in this way.

It seems Rocket Loader options helps. Now PSI for mobile is also above 90