Skip to main content

Reduce unused JavaScript indie_compiled.js

 

this if u try indie comiled.js problem will not solved but ur performance can improve 


Reduce unused JavaScript
0.45s
Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity. Learn how to reduce unused JavaScript.LCP
URL
Transfer Size
Potential Savings
Blogger
 Hosting 1st Party
46.9 KiB
27.2 KiB
…res/293…-indie_compiled.js
(resources.blogblog.com)
46.9 KiB
27.2 KiB



Example of async attribute: imrpoved 93

paste this code just below <body> you have to paste only one code async or defer


<script async src="your-script.js"></script>
<script async src="https://resources.blogblog.com/blogblog/data/res/2933384995-indie_compiled.js"></script>

Example of defer attribute: improved 96

<script defer src="your-script.js"></script>

<script defer src="https://resources.blogblog.com/blogblog/data/res/2933384995-indie_compiled.js"></script>



1. Media Queries:

paste this in head section 


ye pura head code ke sath and closing tag ke sath dalna hoga

 <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Your Page Title</title>
  <link href='styles-desktop.css' media='(min-width: 768px)' rel='stylesheet'/>
  <link href='styles-mobile.css' media='(max-width: 767px)' rel='stylesheet'/>
</head>
<body>
  <!-- Your webpage content -->
  
  <!-- A placeholder div for lazy loading -->
  <div id="myLazyLoadElement" style="height: 1000px;"></div>

  <!-- IntersectionObserver lazy loading script -->
  <script>
    // JavaScript code for lazy loading
  </script>
</body>
</html>

2. Lazy Loading Background Images:

paste this code 👇just below the <script>


const targets = document.querySelectorAll('.lazy-load-bg');

const lazyLoad = (target) => {
  const io = new IntersectionObserver((entries, observer) => {
    entries.forEach((entry) => {
      if (entry.isIntersecting) {
        const img = entry.target;
        const imgUrl = img.getAttribute('data-src');
        img.style.backgroundImage = `url(${imgUrl})`;
        observer.disconnect();
      }
    });
  });

  io.observe(target);
};

targets.forEach(lazyLoad);

And paste this👇 code in your HTML: layout

<div class="mspin-black-large lazy-load-bg" data-src="https://www.blogblog.com/indie/mspin_black_large.svg"> <!-- Other content --> </div>

Comments

Popular posts from this blog

Buttons do not have an accessible name photo

 Buttons do not have an accessible name When a button doesn't have an accessible name, screen readers announce it as "button", making it unusable for users who rely on screen readers.  Learn how to make buttons more accessible . Failing Elements div.centered > header.centered-top-container > div.centered-top > button.svg-icon-24-button <button class="svg-icon-24-button hamburger-menu flat-icon-button ripple"> body.version-1-3-3 > aside.sidebar-container > div.navigation > button.svg-icon-24-button <button class="svg-icon-24-button flat-icon-button ripple sidebar-back">

web font ko repair karne ki technic

  Certainly! Here are different attributes or techniques used in web development and their functionalities: Swap Attribute (CSS Font Loading API) : Functionality : font-display: swap; is a CSS property used with @font-face rules. It tells the browser to use a fallback font until the custom font is downloaded, at which point it swaps to the custom font. Defer Attribute (Script Loading) : Functionality : The defer attribute in the script tag ( <script defer src="..."></script> ) tells the browser to download the script file while parsing the HTML document. It defers the script execution until the HTML parsing is complete. Async Attribute (Script Loading) : Functionality : Similar to defer , the async attribute ( <script async src="..."></script> ) also loads external scripts asynchronously while allowing the HTML parsing to continue. However, it doesn't guarantee the order of script execution, which could lead to different behavior comp...