Largest contentful paint slow AMP

Posted in: Newspaper
Post count: 312

Hi,

Can you explain how Can I improve my score for mobile with AMP version.

Largest contentful paint is very slow with 4.9s.

Can you explain me why ? Thank you

https://developers.google.com/speed/pagespeed/insights/?hl=fr&url=https%3A%2F%2Flowtechnation.com%2F%3Famp

Waiting for your answer

Post count: 312
Post count: 18283

Hello !

The difference is normal since free themes are offering less than 20% from what Newspaper Theme offers.

The speed of your website depends on how well your site is optimized, if you follow the steps which are presented in this tutorial here -> https://tagdiv.com/how-to-increase-page-loading-speed/ you’ll be able to increase the speed of your website.
Also you can check this similar topic for more solutions: -> https://forum.tagdiv.com/topic/optimize-script-to-improve-site-speed/ -> https://www.infophilic.com/get-almost-100-pagespeed-newspaper-theme/
https://forum.tagdiv.com/topic/a-few-tips-for-newspaper-x-speed-high-cpu-usage-issues/

Also if you want our custom services, you can contact our custom work team here: https://tagdiv.com/premium-customization-services/

Thank you!

Post count: 312

https://gtmetrix.com/reports/lowtechnation.com/b52UA4N3

Please, if you see my gt metrix score on dekstop, you see my score is very good, that’s why I ask you to explain me why the amp version on mobile is so slow ? There is not topic in your list speaking about my problem.

Largest contentful paint is very slow with 4.9s.

https://developers.google.com/speed/pagespeed/insights/?hl=fr&url=https%3A%2F%2Flowtechnation.com%2F%3Famp

Post count: 312

How to delete non used JS on AMP ?

Post count: 35449

Hi,

For removing the the js you can try some functions like this one from thus article -> https://wavemotiondigital.com/2016/07/16/remove-new-relic-javascript-from-wordpress-amp-pages/ also I think that Largest contentful paint is a new element added in google speed tester, we’ll make some investigation to make the theme better for Largest contentful paint too.

Thank you for your understanding!

Post count: 312

So for exemple, If I want to delete “https://cdn.ampproject.org/v0.js”

I put this code into functions.php wp-content>plugins>td-composer>mobile>amp>functions.php

/** Disable New Relic Scripts in AMP Pages */
function disable_newrelic_for_amp_pages()
{
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
if (extension_loaded('newrelic')) {
newrelic_disable_autorum( true );
}
}
}
add_action('init', 'disable_newrelic_for_amp_pages');

??

Thank you

Post count: 312

Hi,

please go read this topic on wordpress.org support

https://wordpress.org/support/topic/largest-contentful-paint/

and this one too

They said me “add link[rel=preload] element for those each of those 4 images.

So the head of the page could have included:

<link rel=”preload” as=”image” href=”https://lowtechnation.com/wp-content/uploads/2020/04/test-orientation–741×486.jpg”&gt;
<link rel=”preload” as=”image” href=”https://lowtechnation.com/wp-content/uploads/2020/04/Agriculture-Low-Tech-1-741×486.jpg”&gt;
<link rel=”preload” as=”image” href=”https://lowtechnation.com/wp-content/uploads/2020/04/Biblilowtech-741×486.jpg”&gt;
<link rel=”preload” as=”image” href=”https://lowtechnation.com/wp-content/uploads/2020/04/Transport-Logistique-Low-Tech-741×486.jpg”&gt;
If you can add these links via the wp_head action yourself for that template, this will fix the issue.”

How can I do this ?

Thank you

  • This reply was modified 6 years by gumball44.
  • This reply was modified 6 years by gumball44.
Post count: 312
Post count: 35449

Hi,

We’ll check to see how this is working. I inform our developers about the suggestion you’ve made, they will check and will fix this problem.

Thank you for your understanding!
Have a nice weekend!

Post count: 312

Weston Ruter (@westonruter) said me to add

<link rel=”preload” as=”image” href=”https://lowtechnation.com/wp-content/uploads/2020/04/test-orientation–741×486.jpg”>
<link rel=”preload” as=”image” href=”https://lowtechnation.com/wp-content/uploads/2020/04/Agriculture-Low-Tech-1-741×486.jpg”>
<link rel=”preload” as=”image” href=”https://lowtechnation.com/wp-content/uploads/2020/04/Biblilowtech-741×486.jpg”>
<link rel=”preload” as=”image” href=”https://lowtechnation.com/wp-content/uploads/2020/04/Transport-Logistique-Low-Tech-741×486.jpg”>

via via the wp_head

My question is How can I do it ?

Post count: 35449

Hi,

These 4 images are get from your posts, these are not static to can be set as in your example, the rel=”preload” need to be set on the dynamical code that is displaying the images, also in order to be apply correctly this code need to be set by a developer.
The file responsive for the big image 741×486 from mobile and amp is this one wp-content/plugins/td-composer/mobile/includes/modules/td_module_mob_2.php but most probably the code that need to be edited is in this function ->https://i.imgur.com/TpLoK21.png -> wp-content/plugins/td-composer/legacy/common/wp_booster/td_module.php

Thank you!

Viewing 12 posts - 1 through 12 (of 12 total)
The forum ‘Newspaper’ is closed to new topics and replies.