*

Own Petz

  • ****
  • 171 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Resources are blocking the first paint of your page
« on: November 07, 2024, 10:00:12 AM »
Hello,

I have checked my website on Pagespeed website - my website is performance good for desktop but for mobile its bad... How to Fix this..

See this in attached Image.

How to fix this issue for mobile because website visiting more from mobile.


Eliminate render-blocking resources Potential savings of 2,540 ms
Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles. Learn how to eliminate render-blocking resources.LCP FCP

Largest Contentful Paint element 5,550 ms

and more...

many error for mobile..

Thanks in advance.
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

Own Petz

  • ****
  • 171 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: Resources are blocking the first paint of your page
« Reply #1 on: November 07, 2024, 10:06:27 AM »
Mainly 2 error - which need to fix

1. Eliminate render-blocking resources Potential savings of 2,540 ms (Screenshot attached)


2. Largest Contentful Paint element 5,550 ms (Screenshot attached)
 
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

MB Themes

Re: Resources are blocking the first paint of your page
« Reply #2 on: November 07, 2024, 10:25:22 AM »
I think those stats are not super precise, anyway you can try to play with Optimization section in backoffice.
Many of those require shuffles in core and at the end of the day when you fix one issue you fall into another.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Own Petz

  • ****
  • 171 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: Resources are blocking the first paint of your page
« Reply #3 on: November 07, 2024, 11:02:00 AM »
Thanks for reply.

I have already these setting enabled (Image attached)


Google suggest use defer, async and this
Example implementation: <script src="/oc-content/uploads/minify/292387782fc8771b67d1b0c2abd64f31.js" async></script>

<script>/* contents from /oc-content/uploads/minify/292387782fc8771b67d1b0c2abd64f31.js here...*/</script>


where can I do this..
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

MB Themes

Re: Resources are blocking the first paint of your page
« Reply #4 on: November 07, 2024, 11:07:03 AM »
You can try to modify Scripts/Styles files in core and add async or defered by might cause troubles or errors (js)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Own Petz

  • ****
  • 171 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: Resources are blocking the first paint of your page
« Reply #5 on: November 07, 2024, 11:22:11 AM »
sorry but I am not understanding...


this file - 292387782fc8771b67d1b0c2abd64f31.js available in upload/minify


but how to write this and where

 <script src="/oc-content/uploads/minify/292387782fc8771b67d1b0c2abd64f31.js" async></script>
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com

*

MB Themes

Re: Resources are blocking the first paint of your page
« Reply #6 on: November 09, 2024, 11:16:37 PM »
that usually goes to footer, but then it means that there cannot be code with jQuery before, that not always happens.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Ajit Sahane

  • ****
  • 158 posts
  • https://bestclassifiedsusa.com
Re: Resources are blocking the first paint of your page
« Reply #7 on: November 11, 2024, 08:39:15 AM »
I am achieve this js script async or defer function with custom code. like - <script  type="text/javascript" src="https://in.nearmeads.com/oc-includes/osclass/assets/js/date.js"  async ></script>

see attachment.


*

MB Themes

Re: Resources are blocking the first paint of your page
« Reply #8 on: November 11, 2024, 09:28:50 PM »
Some of scripts can be async but I do not think not all of them.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

wilmashawnee

  • *
  • 2 posts
  • Data Recovery Software
Re: Resources are blocking the first paint of your page
« Reply #9 on: November 12, 2024, 11:45:22 AM »
Is it responsive enough as per diferent mobile screen size?
Data Recovery Software

*

Own Petz

  • ****
  • 171 posts
  • OwnPetz - Free Classified Ads. Buy, Sell or Adopt
Re: Resources are blocking the first paint of your page
« Reply #10 on: November 16, 2024, 10:43:20 AM »
when I ask chatgpt to fix this issue.

I have share head.php to chatgpt and then chatgpt rewrite this head.php  then some error  fixed..

Is this Head.php ok .. .and other thing how to fix this attached error Largest Contentful Paint element 5,100 ms

<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title><?php echo meta_title(); ?></title>
<meta name="title" content="<?php echo osc_esc_html(meta_title()); ?>" />
<?php if (meta_description() != '') { ?>
    <meta name="description" content="<?php echo osc_esc_html(meta_description()); ?>" />
<?php } ?>
<?php if (osc_get_canonical() != '') { ?>
    <link rel="canonical" href="<?php echo osc_get_canonical(); ?>" />
<?php } ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!-- Robots -->
<?php if (!osc_is_search_page()) { ?>
    <meta name="robots" content="index, follow" />
    <meta name="googlebot" content="index, follow" />
    <meta name="bingbot" content="index, follow" />
    <meta name="yandex" content="index, follow" />
<?php } ?>

<!-- Open Graph -->
<meta property="og:title" content="<?php echo osc_esc_html(meta_title()); ?>">
<meta property="og:description" content="<?php echo osc_esc_html(meta_description()); ?>">

<!-- Preconnect -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://cdnjs.cloudflare.com">

<!-- Styles -->
<link href="https://fonts.googleapis.com/css2?family=Lora:wght@700&family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet" media="print" onload="this.media='all'">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css">
<?php
osc_enqueue_style('style', osc_current_web_theme_url('css/style.css?v=' . date('YmdHis')));
osc_enqueue_style('responsive', osc_current_web_theme_url('css/responsive.css?v=' . date('YmdHis')));

if (del_is_rtl()) {
    osc_enqueue_style('rtl', osc_current_web_theme_url('css/rtl.css') . '?v=' . date('YmdHis'));
}
?>

<!-- Scripts -->
<script>
    var baseDir = "<?php echo osc_base_url(); ?>";
    var currentLocation = '<?php echo osc_get_osclass_location(); ?>';
    var currentSection = '<?php echo osc_get_osclass_section(); ?>';
</script>
<?php
osc_register_script('global', osc_current_web_theme_js_url('global.js?v=' . date('YmdHis')), ['jquery']);

osc_enqueue_script('jquery');
osc_enqueue_script('global');

// Lazy Load and Conditional Scripts
if (del_param('lazy_load') == 1) {
    osc_register_script('lazyload', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.9/jquery.lazy.min.js', ['jquery']);
    osc_enqueue_script('lazyload');
}

if (osc_is_ad_page() || (osc_get_osclass_location() == 'item' && osc_get_osclass_section() == 'send_friend')) {
    osc_register_script('swiper', 'https://cdnjs.cloudflare.com/ajax/libs/Swiper/6.5.8/swiper-bundle.min.js', ['jquery']);
    osc_enqueue_script('swiper');
}

osc_run_hook('header');
?>
OwnPetz - Free Classified Ads. Buy, Sell or Adopt Online. https://ownpetz.com