<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omojuwon Soneye on Medium]]></title>
        <description><![CDATA[Stories by Omojuwon Soneye on Medium]]></description>
        <link>https://medium.com/@calebomojuwon?source=rss-6c9416084ab1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*82Sjn1Zew3XV3GhkWk414g.jpeg</url>
            <title>Stories by Omojuwon Soneye on Medium</title>
            <link>https://medium.com/@calebomojuwon?source=rss-6c9416084ab1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 11:41:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@calebomojuwon/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Trust is the greatest currency]]></title>
            <link>https://medium.com/@calebomojuwon/trust-is-the-greatest-currency-b5b41a3c37f0?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5b41a3c37f0</guid>
            <category><![CDATA[earn-money-online]]></category>
            <category><![CDATA[digital-marketing]]></category>
            <category><![CDATA[clients]]></category>
            <category><![CDATA[advertising]]></category>
            <category><![CDATA[online-marketing]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Sat, 29 Nov 2025 23:11:25 GMT</pubDate>
            <atom:updated>2025-11-29T23:11:25.706Z</atom:updated>
            <content:encoded><![CDATA[<p>People say ATTENTION is the greatest currency in this modern economy. I believe it is TRUST. We are in a trust recession, ads are more expensive than ever. Everyone is creating content. There is an information overload and it’s becoming harder for businesses to hire you</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bRrfcxdXjUgSBIpg" /></figure><p>From a COLD OUTREACH (cold email , cold call or whatever). Everyone is doing it . Why ? There is no barrier to entry. Anyone can use ChatGPT — email a company . You end up having to offer your services at a severe discount- just to get your foot in the door You look cheap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*FbzpdAOdrQpOruk2" /></figure><p>These traditional clients acquisition is fatigued . How can you build trust without having to jump on a content hamster wheel? The funnel is simple . It is no funnel It is an ecosystem. Ecosystem of relevant information IG ads = you don’t sell ! Never sell! What you do is ..</p><p>Your Ig ads talks about a pain point your niche wants to solve . Something that really stings . You invite them to comment follow and dm So can send access to a free YOUTUBE video that provides detailed solutions to that problem When they respond you send a tally form.</p><p>Like the one in bio. Once they fill the form , you get their email and name and they have a link to your YouTube. Your YouTube channel has to contain a series of valuable video that talks about their problem and you solving it live on the call. A few these people</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/0*Qi8fly3Qop_OAI6N" /></figure><p>Might see 2–3 videos &amp; decide to book a call with you . Majority won’t That’s completely okay , they don’t trust you yet . You have there Emsils Every lead in your email list are in pain . The longer they take no action the more the pain lingers . You nuture ..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/0*aUH3rPxArsa62OI_" /></figure><p>Then with your emails. Now your emails are not in random email , they know you. The more Emails you send of , not SELLING . But showing the value you can provide and show casing your past work . The easier it is for them to trust You need a 1% conversion rate of 1000 emails</p><p>To get 10 clients. Unlike website development or Ui/ux design With marketing you have a steady MRR</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5b41a3c37f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing User Experience: Frontend Best Practices for FID]]></title>
            <link>https://medium.com/@calebomojuwon/optimizing-user-experience-frontend-best-practices-for-fid-e70c0be31b54?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e70c0be31b54</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[web-optimization]]></category>
            <category><![CDATA[first-input-delay]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Sat, 17 Jun 2023 17:17:05 GMT</pubDate>
            <atom:updated>2023-06-17T17:17:05.419Z</atom:updated>
            <content:encoded><![CDATA[<p>Say you find yourself caught up in a black market frenzy or an auction where the winner is determined by who clicks their finger on a button first. You click the button to add an item to your cart, but there’s a slight delay before the website registers your request, causing you to lose the bid. It’s not because you were slow, but rather due to an input delay. While this is an extreme case of input delay, many of us have experienced delays in interactivity while using the internet. This can be frustrating and negatively impact the user experience. It also affects the visibility of our website, as Google penalizes sites that don’t meet its Core Web Vitals standards.</p><p><strong>First Input Delay (FID) is now an official ranking factor for Google.</strong> FID measures a website’s responsiveness, while Cumulative Layout Shift (CLS) tracks visual stability, and Largest Contentful Paint (LCP) measures loading speed. Google incorporated Core Web Vitals as part of its ranking algorithm in June 2021.</p><p>But what causes this input delay, and how can it be fixed? Let’s explore these questions further:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*xnc1YbeFQg-gVjyLRhtMZQ.png" /></figure><h3>What is First Input Delay (FID)?</h3><p>FID occurs when the browser’s main thread is busy performing other tasks and is unable to respond immediately to the user’s request. This delay adds the user’s requested interaction to the event queue and executes it once the main thread finishes its current task.</p><p>The delay typically happens during the initial rendering of a web page when the browser’s main thread is busy loading elements such as images, JavaScript scripts, CSS, and fonts.</p><h3>What Interactions Can Be Measured?</h3><p>FID scores can vary among users, as some users may be fine waiting for the entire page to render before interacting with it or maybe distracted from the browser while the page loads.</p><p>Finite interactions are used to measure FID, meaning scrolling and zooming are not prerequisites for measuring FID as they don’t run on the browser’s main thread. Instead, tapping, key presses, and clicks are among the quantitative interactions used to measure FID.</p><h3>What is a Good FID Score?</h3><p>Users perceive a website’s interactivity as excellent when the response time is less than 100 milliseconds (0.1 seconds). To be on the safe side, it’s best to aim for an FID score of less than 0.1 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*7T-lBkuV7hckkPCLnF0OlQ.png" /></figure><h3>How Can We Improve FID Score?</h3><ol><li>Optimization of CSS: There are several options for optimizing CSS. When a page is rendered, CSS files need to be downloaded and parsed to paint the layout of the web page. This event is of a high priority since the layout and visual aesthetics significantly impact the user’s experience. Techniques like minification can be used to improve CSS load time, as discussed in my <a href="https://medium.com/@calebomojuwon/minfication-of-css-for-perforance-optimization-198d260b804b"><strong>PREVIOUS BLOG</strong></a>.</li><li>Optimization of JavaScript:</li></ol><ul><li>Break long tasks into smaller asynchronous tasks: This allows the browser’s main thread to process user input while smaller tasks are being carried out.</li><li>Aim to reduce rendering of data on the client side: Rendering more data on the client side increases the load on the browser’s main thread. Consider using server-side rendering.</li><li>Evaluate the trade-off between using third-party services and code for tracking analytics and user interaction: These services can be useful but may impact the user experience. Analyzing the trade-off is crucial.</li><li>Utilize web workers: Delegate some main thread work to web workers, reducing the workload on the main thread. Web workers allow you to run JavaScript code on a separate thread, resulting in less input delay.</li><li>Async/await or defer unused JavaScript: Allow JavaScript code to run only when needed, keeping the main thread less occupied.</li></ul><h3>Measuring FID</h3><p>To measure FID, you can use the web-vital JavaScript library.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e70c0be31b54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performance Budgets: A Powerful Tool for Startups to Improve Web Performance and Reduce CO2…]]></title>
            <link>https://medium.com/@calebomojuwon/performance-budgets-a-powerful-tool-for-startups-to-improve-web-performance-and-reduce-co2-19ae9eacf52e?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/19ae9eacf52e</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Tue, 23 May 2023 16:05:13 GMT</pubDate>
            <atom:updated>2023-05-23T16:05:13.034Z</atom:updated>
            <content:encoded><![CDATA[<h3>Performance Budgets: A Powerful Tool for Startups to Improve Web Performance and Reduce CO2 Emissions</h3><p>Just as overeating leads to weight gain and reduced mobility, the addition of new features such as images, ad tracking codes, or media embeds to your web pages adds unnecessary weight. This results in decreased performance, and longer load times, and ultimately frustrates users, especially those with slower internet connections or older devices. Additionally, this excessive data usage contributes to environmental harm.</p><p>Today, approximately half of all internet traffic originates from mobile devices, with the percentage increasing from 50% in 2017 to 58% in 2022. Research indicates that users are less likely to leave a webpage if it doesn’t load within 3 seconds. Moreover, search engines like Google rank slower-performing websites lower, penalizing those who do not prioritize speed. These implications should be concerning, as they directly impact business revenue.</p><p>Investing significant financial resources throughout the software cycle, from design to development to deployment, only to have our intended users unable to effectively use our software, would be a waste of money. It would also create a negative first impression of our startup among our user base.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*CEyffiwd5mte6zjimjBMFQ.png" /></figure><h3><strong>WHAT IS THE PERFORMANCE BUDGET</strong></h3><p>A performance budget is just what it sounds like you set a “budget” on your page and do not allow the page to exceed that. Exceeding this budget comes with expensive technical debt</p><p>Similar to a weight scale, a performance budget provides guidance during the development process. It includes two levels: warning and error.</p><ul><li>The warning level allows proactive planning for technical debt without blocking development or deployment.</li><li>The error level represents an upper bound limit, indicating that any changes beyond this point will have a noticeable and negative impact.</li></ul><h3>PERFORMANCE AND SUSTAINABILITY</h3><p>Performance and sustainability are closely linked. The internet consumes a significant amount of electricity, approximately 416.2TWh per year, which exceeds the total electricity use of the United Kingdom. From the moment we enter a web page URL into a browser, electricity is consumed to transmit the request and serve the page. Heavier pages require more electricity, which often comes from fossil fuel sources and contributes to CO2 emissions. In fact, the total CO2 emissions generated by the internet surpass those of the global aviation industry</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*xLBodSxKGQj3xSwKkTPpDw.png" /></figure><p>Thus, besides frustrating users and resulting in financial losses, a slow-performing website also contributes to environmental damage.</p><p>Reducing the size of files being loaded on 2 million of websites by just one kilobyte can lead to a significant reduction in CO2 emissions, estimated at 2950 kg per month.</p><h3>SETTING WEB PERFORMANCE BUDGET</h3><p>To establish a web performance budget, it is recommended to focus on page weight, which represents the amount of data transferred to access a web page through HTTP requests. It is advised to keep this metric as low as possible, with a maximum of 1 MB at the start and an ultimate threshold of 500 kB.</p><p>Setting a performance budget at the beginning of a project is crucial to avoid backtracking, waste of resources, and irreparable damage to the user experience. This budget should be collectively decided upon by the UI designers, project managers, and engineers, considering trade-offs between assets and technology frameworks to ensure that performance is not sacrificed for presentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*25icOQky1JprtkapEt2vdA.png" /></figure><h3>GUIDE</h3><p>Answering important questions such as the target audience, their devices, content management considerations, and regional variations in internet speed will help in defining limits for various performance-affecting factors:</p><ul><li>Number of HTTP requests sent</li><li>Load time on default baseline, device, and network</li><li>Size of images</li><li>Number of web fonts</li><li>Maximum size of scripts, including frameworks</li><li>Third-party scripts</li></ul><p>However, it’s important to note that web performance is not solely measured by these metrics. The order in which elements are located in the DOM when requested also plays a significant role in user experience.</p><h3>EXAMPLE PERFORMANCE BUDGET</h3><p>Examples of performance budgets include requirements such as</p><ul><li>The homepage is under 200 KB in size and loads within 2 seconds on a Fast 3G mobile network</li><li>The search page has less than 1.5 MB of images on the desktop site</li><li>The blog page loading within 1.5 seconds and becomes interactive in under 5 seconds on a Slow 3G network,</li><li>The landing page achieved a performance score above 85 in Lighthouse performance audits.</li></ul><p>In my next article, I will delve deeper into the topic of measuring performance with the right metrics. We will explore various performance indicators, discuss their significance, and learn how to effectively utilize them to evaluate and improve web performance. Stay tuned to discover valuable insights that will empower you to create faster, more efficient, and user-friendly digital experiences.</p><p>Remember, by measuring performance with the right metrics, we not only enhance user satisfaction and business revenue but also contribute to a sustainable future for our planet.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19ae9eacf52e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MINFICATION OF CSS FOR PERFORANCE OPTIMIZATION]]></title>
            <link>https://medium.com/@calebomojuwon/minfication-of-css-for-perforance-optimization-198d260b804b?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/198d260b804b</guid>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Sun, 14 May 2023 09:53:04 GMT</pubDate>
            <atom:updated>2023-05-14T10:29:25.687Z</atom:updated>
            <content:encoded><![CDATA[<h2>MINIFICATION OF CSS FOR PERFORANCE OPTIMIZATION</h2><p>In this article I will explain to you in a very clear and concise. manner on how you can improve the performance of your web applications by minifying CSS .</p><ul><li>WHAT IS MINIFICATION</li><li>OPTIMIZE CSS ASSET WEB PLUGIN</li><li>USE NEXTJS</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*N8i9AbHCm412vwVwzR89Dw@2x.jpeg" /></figure><p>As engineers , we write code in ways that makes it easier for us to read and , other to read . So we indent out code , write comments and use spaces a lot . This are very good pratices for readiblity , but it affects the performance . These spaces , comment etc , accumulates data , the more robust our code base is , the more such data it will consume , cause a lag or perfomance drag . Computer does not need readable code to work , minifying the css , that is removes these spaces .Greatly improving performance .</p><p>MINIFICATION OF CSS</p><p>This is the removal of white spaces , indentition and comments in the code sent to production , when we run the npm build command . These two code samples are the same thing but the first , causes a performance drag.</p><pre>body {<br>  font-family: &quot;Benton Sans&quot;, &quot;Helvetica Neue&quot;, helvetica, arial, sans-serif;<br>  margin: 2em;<br>}<br><br>/* all titles need to have the same font, color and background */<br>h1 {<br>  font-style: italic;<br>  color: #373fff;<br>  background-color: #000000;<br>}<br><br>h2 {<br>  font-style: italic;<br>  color: #373fff;<br>  background-color: #000000;<br>}</pre><pre>body{font-family:&quot;Benton Sans&quot;,&quot;Helvetica Neue&quot;,helvetica,arial,sans-serif;margin:2em}h1,h2{font-style:italic;color:#373fff;background-color:#000}</pre><p>The second is the best way to provide our code to the browser . I cant write code in my laptop like this, it would not take long before i get confused . There are online tools that can help us write remove these unnecesary spaces and indentation and commenrs .</p><p>EXAMPLE</p><p>https://www.cleancss.com/css-minify/</p><p>This , however can only work on small code bases , that would be easier to just copy and paste, to get the minified version . However , it would not be scalable way to write code , when working on large code bases. There is a more efficient way to do this , which minifies our code intuitively</p><p>Let me show you to method to do this !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*kl8udct-kH558fWDj3-iFQ@2x.jpeg" /></figure><p>OPTIMIZE CSS ASSETS WEBPACK PLUGIN</p><p>This plugin is very helpful to minify out code in our react web based applications . It will search for CSS assets during the Webpack build and will optimize \ minimize the CSS. Read more https://github.com/NMFR/optimize-css-assets-webpack-plugin</p><p>STEPS</p><ol><li>Install optimize css assets</li></ol><pre> npm install --save-dev optimize-css-assets-webpack-plugin</pre><p>2. Open the webpack.config.js file, and make the following modifications:</p><pre>const OptimizeCSSAssetsPlugin = require(&quot;optimize-css-assets-webpack-plugin&quot;);<br><br>plugins: [<br>    new HtmlWebpackPlugin({template: &quot;./src/index.html&quot;}),<br>    new MiniCssExtractPlugin({filename: &quot;[name].css&quot;}),<br>    new FixStyleOnlyEntriesPlugin(),<br>    new OptimizeCSSAssetsPlugin({})<br>  ]</pre><p>THATS ALL!</p><p>When you run “npm run build”, the code will be minified , and this will greatly reduce the size of the css file .</p><p>JUST WRITE YOUR CODE IN NEXT JS</p><p>Nextsjs offers out of the box , features that just make the developer experene a pleasure and optimizes for a gretaer performance</p><ol><li>Code splitting: Next.js automatically splits your code into smaller chunks, which are loaded on demand as needed. This can improve the performance of your application by reducing the amount of code that needs to be downloaded and parsed by the browser.</li><li>Tree shaking: Next.js uses webpack’s tree shaking capabilities to eliminate dead code and optimize your application bundle size.</li><li>Minification: Next.js applies minification to your application code, including CSS, to reduce the size of the files that need to be downloaded by the browser.**</li><li>Automatic polyfilling: Next.js automatically detects which features of modern JavaScript are supported by the user’s browser, and includes polyfills for unsupported features as needed.</li></ol><p>MINIFICATION is a tool done out of the box with nextjs , you dont need to install an extra package , it just minifies your css out of the box.</p><p>WE CAN ALWAYS MAKE THINGS FASTER AN BETTER</p><p>Nextjs greatly reduces the size of css file , the screenshot attached , shows the size of the css file which is 3.8kb</p><p>This is great, but the code is minified to just one big giant file . When we work on project , it is advisible to write out code in modules , using preprocessors like SASS or SCSS. For the following reasons</p><ol><li>Reusability: By keeping your CSS code in separate files, you can more easily reuse it across different pages or components of your website. This can save you time and effort, as you don’t need to duplicate code or make the same changes in multiple places.</li><li>2. Organization: By separating your CSS code into different files, you can keep your code more organized and easier to understand. This can be particularly helpful for larger websites or projects where the CSS code can become quite complex.</li><li>3. Caching: Separating your CSS code into different files can also make it easier for web browsers to cache the files. This can improve your website’s loading speed, as the browser can retrieve the CSS files from its cache rather than having to download them again.</li></ol><p>However on further observation , if you double click on the css file, it is just one gaint file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*RKCMfs0KSfMCXv8iAbTohg@2x.jpeg" /></figure><p>How can we fix this ?</p><p>In my next article I will discuss how you can use MINI-CSS-EXTRACT-PLUGIN to fix this</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=198d260b804b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A friend of mine complained to me about the load time of pages of his company’s software.]]></title>
            <link>https://medium.com/@calebomojuwon/a-friend-of-mine-complained-to-me-about-the-load-time-of-pages-of-his-companys-software-bc32910c0f99?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc32910c0f99</guid>
            <category><![CDATA[cdn]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[image-optimization]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Sun, 07 May 2023 12:14:34 GMT</pubDate>
            <atom:updated>2023-05-07T12:14:34.658Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Blah to Blazing: How to Supercharge Your Website with Image Optimization</h3><p>A friend of mine complained to me about the load time of pages of his company’s software. We both suspected the image size and format could be the culprits of this slow load time. Here is the solution I recommend to him, which would be useful to you to improve the load time of your website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*851ftwMDUtHvtsBeyTUZtA.png" /></figure><p>Page performance is closely linked to the revenue generated and engagement gathered on software, as slower-performing websites give a bad user experience to customers.</p><p>Images are a major culprit in web performance as they increase the time it takes for the largest contentful paint to be rendered to the user. Images without predefined dimensions contribute to sudden layout shifts as well.</p><p>In this article, I will highlight methods to which we can perform to reduce the size of images, without affecting the quality.</p><h3>Format</h3><p>Images can come in different formats, but not all formats are best for high performance on the web. JPEG, PNG, and others are very popular formats, but they are not the best as they are usually large and heavily rendered. It is also expensive for users because they require a lot of data to have these images displayed on their browsers.</p><p>AVIF and WEBP are the best formats that can be used to render images on the webpage. This format reduces the image size without affecting the quality of the image.</p><p>There are various tools online that can be used to achieve this transformation. I will show you how to use my favorite.</p><p><a href="https://convertio.co/png-webp/">PNG to WEBP (Online &amp; Free) - Convertio</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*osZBjAoGD8LpzZg0JEIxBQ.png" /></figure><p>The image selected was 1.45 MB, which is commonly used on most websites. After converting it to WebP, its size was reduced to about 699 KB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rzlZ6rHjnfo64bx36DLyNg.png" /></figure><p>This is much better, and the quality of the image was not affected, making this a better format to be used on our website.</p><h3>WAIT, NOT SO FAST</h3><p>We can still improve the performance by using a content delivery network (CDN). A CDN is a system of distributed servers that deliver web content to users based on their geographic location. Using a CDN for images can improve website performance by reducing the load time for large images. The images are cached on the CDN servers closer to the user’s location, reducing the distance the image data has to travel. This can result in faster load times and a better user experience for website visitors.</p><p>There are various examples of services that provide CDNs, easy and out of the box to use.</p><p>My favorite is IMAGE KIT: <a href="https://imagekit.io/">https://imagekit.io/</a></p><p>After downloading the image in WebP format, you can upload the image to IMAGE KIT.</p><p>On the left bar, you will see the image media. Click on that bar and upload your image to their server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*giX8p3lEAmCuoAf_gLI5mw.png" /></figure><p>Right-click on the image to copy the link, which can be used in the src property of your image tag</p><p>DONE</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc32910c0f99" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Need for Speed: How Measuring FCP can Enhance Your Website’s User Experience]]></title>
            <link>https://medium.com/@calebomojuwon/the-need-for-speed-how-measuring-fcp-can-enhance-your-websites-user-experience-f3db075cb740?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3db075cb740</guid>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[fcp]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Wed, 19 Apr 2023 15:10:51 GMT</pubDate>
            <atom:updated>2023-05-29T13:12:55.816Z</atom:updated>
            <content:encoded><![CDATA[<p>When accessing my blog post, the initial content that typically appears, depending on your location, is the header. Subsequently, the remaining content loads synchronously until all elements are displayed and you are able to read the text. The time it takes for the first content to load, which may include images (including background images), &lt;svg&gt; elements, or non-white &lt;canvas&gt; elements, has a significant impact on the user’s initial impression. If the first content takes too long to load, users may perceive the website as unresponsive and exit immediately. This is commonly known as the first contentful paint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*xFOHr66LjZqK2oYxnw22jQ.png" /></figure><blockquote><strong>THE TIME IT TAKES FOR THE FIRST CONTENT OF THE PAGE TO BE RENDERED BEFORE THE USER’S SCREEN.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pDqFB9suNAUH1ETAIGlmtg.png" /></figure><p>Improving the First Contentful Paint (FCP) metric is crucial in creating the impression of a fast-loading website. FCP refers to the time taken for the first piece of content on a web page to be rendered on the user’s screen. It is important to note that while a website may have a considerably fast FCP, it may have a slow Largest Contentful Paint (LCP), which refers to the time it takes for the largest content on the page to be rendered on the Document Object Model (DOM).</p><p>To improve web performance, a holistic audit should be carried out, and improvements should be made on all Google Web Core Vital metrics. While a good FCP score is between 0–1.8 seconds, a fair score is between 1.8–3.0 seconds, and a poor score is 3 seconds or more, according to Google.</p><p>A fast FCP score can significantly improve the user’s perception of a website’s speed, but it is crucial to assess all metrics that contribute to web performance and carry out appropriate improvements for optimal results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*yRHw-kVKp16ltBJCUbDnUA.png" /></figure><p><strong>TOOLS TO MEASURE FCP</strong></p><p>There are different tools used to measure the FCP, based on two different conditions (Feild measurement and Lab measurement ).</p><p><strong>Lab Testing</strong></p><p>When developing features for software, it is not possible to gather information on how this feature will interact with real users. Tests are carried out in the lab, to find out how this tool will interact in the real world. The following tools can be used to carry out this test</p><ul><li>Chrome Devtools</li><li>Lighthouse</li><li>PageSpeed insight</li><li>Webpageteest</li></ul><p><strong>Field Testing</strong></p><p>On the other hand, while testing in the lab is a reasonable proxy for performance, it isn’t necessarily reflective of how all users experience your site in the wild. The performance of the website can vary drastically based on the user’s device and network. The following tools can be used to carry out this test</p><ul><li>Chrome User experience report</li><li>Search Console (Core Web Vital report )</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3db075cb740" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Improve User Experience by Eliminating Layout Shift]]></title>
            <link>https://medium.com/@calebomojuwon/how-to-improve-user-experience-by-eliminating-layout-shift-d9e7cf83845d?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9e7cf83845d</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[user-interface]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Thu, 13 Apr 2023 20:53:00 GMT</pubDate>
            <atom:updated>2023-04-13T20:53:00.959Z</atom:updated>
            <content:encoded><![CDATA[<p>Layout shift is a significant issue that can result in a poor user experience on websites. Users may accidentally click on unintended buttons or have their reading workflow interrupted due to text shifts. In a previous article, I discussed Cumulative Layout Shift (CLS), a Google Web Core Vital used to measure the degree of layout shift.</p><p>In this article, I will highlight the culprits responsible for these rapid, unexpected, and unwarranted layout shifts and outline steps that can be taken to reduce them. By addressing these culprits, we can improve the user experience on our websites and ensure that users can interact with our content in a smooth and seamless manner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DRdos9ap_Gg5ZUV90RyE8A.png" /></figure><p>CULPRIT 1 — IMAGES WITHOUT DIMENSION: Always include image size in the code sent to the browser for rendering. This ensures that the browser allocates space for the image being rendered from the server. To ensure responsive design and fluidity, use media queries to specify image dimensions for different viewports. By doing this, you achieve two objectives: responsive design and reduced layout shift.</p><p>CULPRIT 2 — AD, EMBEDS, AND IFRAMES WITHOUT DIMENSION: Omitting dimension size is a significant contributor to layout shift. Incorporating ads into a website generates revenue and increases traffic, but these ads may cause layout shifts if the dimensions are unknown. To avoid this, place ads in a container with a specified size and add a CSS property, overflow hidden, to ensure that any extension beyond the stated size of the container is hidden.</p><p>CULPRIT 3 — EMBEDDED FRAMES: Embedded widgets such as Google Maps and YouTube frames are often placed in web pages and can cause massive layout shifts if space is not allocated for them after being fetched. To avoid this, provide an adequate amount of space for the div container that will house the embedment.</p><p>CULPRIT 4 — DYNAMIC CONTENT: Avoid inserting new content above existing content, unless it is in response to user interaction. This ensures that any layout shifts that occur are expected. Examples of such content include sign-up forms and cookie permission requests. Proper loading indicators should also be used when loading dynamic content to prevent sudden layout shifts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9e7cf83845d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SUNK COST FALLACY]]></title>
            <link>https://medium.com/@calebomojuwon/sunk-cost-fallacy-678bf0d5150c?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/678bf0d5150c</guid>
            <category><![CDATA[money]]></category>
            <category><![CDATA[time]]></category>
            <category><![CDATA[relationships]]></category>
            <category><![CDATA[sunk-cost-fallacy]]></category>
            <category><![CDATA[investment]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Thu, 06 Apr 2023 12:30:06 GMT</pubDate>
            <atom:updated>2023-05-29T10:07:03.356Z</atom:updated>
            <content:encoded><![CDATA[<h3>SUNK COST FALLACY IS AFFECTING THE QUALITY OF YOUR LIFE</h3><p>Consider a scenario where one is hungry and decides to venture out in the hot weather to buy food. Halfway through the journey, it is discovered that the intended shop is closed due to it being Sunday. In such a situation, no one will continue on that journey despite being fully aware of the shop’s closure, simply because they have already invested time and effort into the journey. However, proceeding on the journey is foolish, counterproductive, and does not yield the desired outcome.</p><p>In our daily lives, we often find ourselves making decisions based on the investments we have already made, and this can sometimes cloud our sound decision-making skills. It is essential to remember that investing time and effort into a particular course of action does not guarantee success, and it is crucial to remain objective and make decisions based on current circumstances. Being able to let go of previous investments and making decisions based on current circumstances is an important skill that enables us to make sound judgments and achieve our goals effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TfATukrww9j9xRV744CBIA.png" /></figure><p>Sunk costs are investments that we have already made towards achieving a particular goal. These investments may include time, money, and emotional effort, and they are often irretrievable. Because of this, we sometimes feel like we have invested too much to quit, and so we continue investing more and more, even when it may no longer be beneficial to us.</p><p>For example, at the last Burna Boy concert in Lagos, fans waited for 6–7 hours standing, presumably, before the artist arrived. Although they were tired from all the waiting, the investment they had already made, including their hard-earned money spent on buying concert tickets, the Uber they paid to get to the venue, and the time they had already spent waiting for Burna Boy to show up, justified their decision to keep standing. This is a clear example of how sunk costs can influence our decision-making process.</p><p>This phenomenon is not limited to significant events such as concerts. It can also manifest in trivial things such as watching a bad movie in a cinema. People may feel like they have already invested too much time and money to leave the cinema, even if the movie is terrible. Consequently, they may choose to dose off or endure the boredom, even when they could have cut their losses and left.</p><p>It is essential to recognize the impact of sunk costs on our decision-making process and learn to make objective choices based on current circumstances rather than past investments. While it is natural to want to justify our past investments, it is crucial to weigh the benefits and costs of continuing with a particular course of action to determine whether it is worth it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NWTK8Lc5CvV2nz94yO3H0w.png" /></figure><p><strong>CONCORD SUPER SONIC PROJECT</strong></p><p>In the past, the British and French governments signed a joint venture agreement aimed at revolutionizing the aviation industry. The plan was to develop an aircraft that could fly over the Atlantic Ocean in just four hours, which would have had a significant impact on the way people travel.</p><p>The potential of such an aircraft to change the aviation industry cannot be overstated. Air travel would have become faster, more efficient, and more comfortable, allowing people to travel around the world in less time than ever before. The development of such an aircraft would have had a ripple effect on the entire aviation industry, leading to the creation of new technologies and processes that could have improved air travel even further</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DdBznRz36ntiq-QXlwcL7g.png" /></figure><p>The project was initially projected to be quite costly, and given that both Britain and France were prosperous nations, funding was not an issue. However, the project faced numerous setbacks and challenges that required additional investment to overcome.</p><p>Despite the mounting costs and difficulties, the governments of Britain and France remained committed to the project, driven by their initial investment and the goal of achieving a revolutionary breakthrough in aviation technology. However, despite investing over 70 million British pounds (equivalent to 1.3 billion pounds in today’s value), the project ultimately failed to deliver the intended outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Re_UxXycZujy1c6GloFuFA.png" /></figure><p>In our lives we most times will not have to spend 1.3 BILLION pounds before we shut down an idea. However, that being said we spend something more important than money with so much recklessness. A commodity that once spent can never be recovered back like money.</p><h3>TIME</h3><p>Many people find themselves staying in toxic relationships, both platonic and romantic, because of the amount of time they have already invested in them. For example, someone may continue a friendship with a toxic childhood friend for decades simply because they have known each other for so long and feel a sense of loyalty. Similarly, someone may remain in a toxic romantic relationship for years because they have already invested a significant amount of time into it, say 3-6 years. Staying in a bad relationship for the rest of our lives just because we invested 3-6years earlier is a wrong decision</p><h3>QUIT</h3><p>I would like to emphasize that it is not advisable to quit an endeavor simply because it becomes difficult. In fact, many worthwhile pursuits require time, effort, and perseverance in order to achieve success. Examples of such pursuits include building muscles through consistent exercise and proper nutrition, as well as building wealth through smart financial planning and investment strategies.t is important to recognize that encountering obstacles and setbacks is a natural part of any journey toward success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oe9ll9TDuaj99R4nb_cDfg.png" /></figure><p>In conclusion, the sunk cost fallacy can be a major obstacle to making sound decisions in our personal and professional lives. By becoming aware of this cognitive bias and learning to recognize when it may be clouding our judgment, we can make more informed choices and avoid wasting time, resources, and energy on endeavors that are no longer viable or worthwhile.</p><p>Instead of being swayed by past investments and commitments, we should focus on the present and future value of our choices, weighing the potential benefits and drawbacks of each course of action objectively and rationally. By doing so, we can become more effective decision-makers, better equipped to navigate the challenges and opportunities that life presents us with.</p><p>Ultimately, the ability to overcome the sunk cost fallacy requires a combination of self-awareness, critical thinking, and a willingness to let go of our attachment to past investments and commitments. By embracing these qualities and cultivating a mindset of adaptability and resilience, we can achieve our goals and live fulfilling, purpose-driven lives.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=678bf0d5150c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Eliminating Frustrating Web Page Jitters: Understanding and Improving Cumulative Layout Shift]]></title>
            <link>https://medium.com/@calebomojuwon/eliminating-frustrating-web-page-jitters-understanding-and-improving-cumulative-layout-shift-a4a4b79a32c6?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4a4b79a32c6</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[web-optimization]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Wed, 05 Apr 2023 23:07:04 GMT</pubDate>
            <atom:updated>2023-04-19T14:44:01.928Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever visited a website where, just as you were about to click on a button or read some text, the content suddenly shifted or disappeared from view? This can be a frustrating experience, as it disrupts the user’s reading flow and can even lead to unintentional clicks. Such unexpected layout changes are typically caused by asynchronously loaded resources that are added to a page after the DOM has already been rendered. The culprit could be an image or video with unknown dimensions, a font that renders larger or smaller than its fallback, or a third-party ad or widget that dynamically resizes itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*c2ug6cW30YWUtdjMmfqdAA.png" /></figure><p>Often these problems are not easy to catch during development by engineers. Images most time are already cached by the engineers&#39; browser cache, hence faster load time. API fetched locally runs very faster, so there for layout shifts are not so noticeable.</p><p>How then do we measure how many layouts shift our page has and what is an acceptable limit?</p><h3>CUMULATIVE LAYOUT SHIFT</h3><p>In web design, a “layout shift” occurs when elements on a webpage unexpectedly move around during page load or user interaction. These shifts can be frustrating for users, leading to accidental clicks or misinterpretation of information.</p><p>Cumulative Layout Shift (CLS) is a metric that measures the largest burst of layout shift that occurs before a user interacts with the page. A session refers to a time frame during which all layout shifts that occur no more than one second apart are considered part of the same session window. If layout shifts continue for a period of 5 seconds or less, they are included in the same session window. If the layout shifts stop for more than one second or if new shifts occur after the initial 5-second window, a new session window begins.</p><p>The 5-second limit is used to define the duration of a session window for measuring and analyzing the impact of layout shifts on user experience. It helps web designers and developers identify and fix issues that may affect user engagement and satisfaction.</p><p><strong>WHAT IS A GOOD CLS SCORE</strong></p><p>To ensure a positive user experience, it’s recommended to aim for a good CLS score of 0.1 or less, according to Google Core Web Vitals. A CLS score above 0.1 indicates that there is room for improvement in reducing the frequency and impact of layout shifts on your website. By addressing these issues, you can improve the overall usability and user satisfaction of your website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*GEEMRW_ADUfXI3E8FipBNg.png" /></figure><p>HOW THEN IS CLS MEASURED?</p><p>The “Cumulative Layout Shift Score” is calculated based on two metrics: the “Impact Fraction” and the “Distance Fraction.”</p><p>layout shift score = impact fraction * distance fraction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*ko1Ab88hMHbZL8Z_iqVpoQ.png" /></figure><p><strong>IMPACT FRACTION</strong></p><p>The “Impact Fraction” refers to the total area in the viewport that an unstable element, which causes a layout shift, covers before and after the shift occurs. For example, if a text block initially occupies 50% of the viewport height when the page is rendered from the server, but it shifts 25% more from its original position when some asynchronous data loads, the Impact Fraction will be 75% (50% + 25%).</p><p>To clarify, an unstable element refers to an element that causes the page layout to change unexpectedly or without user interaction.</p><p>To calculate the Impact Fraction, we add the initial percentage of the viewport area covered by the unstable element to the percentage shift at the final render.</p><p>Therefore, in the given example, the Impact Fraction is 0.75 or 75%</p><p><strong>DISTANCE FRACTION</strong></p><p>The “Distance Fraction” represents the distance that the unstable element, which causes a layout shift, moves from its initial position to the new position. In the previous example, the page moves 25% from its initial rendering, and the distance from the top of the screen to the new position is 25%, or 0.25.</p><p>To calculate the Distance Fraction, we divide the distance the unstable element moves by the total viewport height. Therefore, in the given example, the Distance Fraction is 0.25.</p><p>CUMULATIVE LAYOUT SHIFT SCORE</p><p>layout shift score = impact fraction * distance fraction</p><p>0.75 * 0.25 = 0.1875</p><p>From this. we observe that improvement has to be made on the web page as it exceeds the recommended Google score on 0.1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*sh3KKhTvmryaGYxhifpWTg.png" /></figure><p>IMPACT FACTION</p><p>The “Impact Fraction” is the visible area within the user’s immediate viewport that experiences a layout shift. In the case where a text block occupies the same height as it did at the first render, the Impact Fraction remains at 0.5.</p><p>It is important to note that the Impact Fraction only considers the visible area within the user’s immediate viewport. Any content that is not visible within the viewport, and does not experience a layout shift, is not factored into the calculation of the Impact Fraction.</p><p>DISTANCE FRACTION</p><p>The distance fraction was stated to be 0.14</p><p>CUMULATIVE LAYOUT SHIFT SCORE</p><p>layout shift score = impact fraction * distance fraction</p><p>0.5 * 0.14 = 0.07</p><p>This is a good score</p><h3>EXPECTED AND UNEXPECTED LAYOUT SHIFT</h3><p>It is true that not all layout shifts are bad. In fact, without layout shifts, the web would not be as useful as it is today.</p><p>“User-initiated layout shifts”</p><p>are layout shifts that occur based on the user’s interaction with the web application, such as scrolling or clicking. For instance, when a user on a mobile device clicks on an input button, the onscreen keyboard pops up, and the content in the viewport moves up to accommodate the keyboard. Similarly, when a user on an e-commerce page selects a category, data is fetched from the database and mapped to the page. The layout might change as the mapping occurs to fill the page up with the data. This is a user-initiated layout shift.</p><p>To provide a better user experience, a pacifier, such as a loader, should be displayed on the screen as the mapping occurs and disappears when the data has finished mapping. This will give the user a better experience by providing feedback on the progress of the data loading and preventing unexpected layout shifts.</p><p>Animaton and transition</p><p>These are great ways to entertain the users and give them a wonderful user experience, However, this should be done in the right manner not abruptly to rattle the users</p><p>The following are CSS properties advised to be used when carrying out animation without triggering the layout shift</p><ul><li>Instead of changing the height and width properties, use transform: scale().</li><li>To move elements around, avoid changing the top, right, bottom, or left properties and use transform: translate() instead.</li></ul><p>TOOLS TO MEASURE CLS</p><p>There are different tools used to measure the CLS, based on two different conditions (Feild measurement and Lab measurement ).</p><p>Lab Testing</p><p>When developing features for software, it is not possible to gather information on how this feature will interact with real users. Tests are carried out in the lab, to find out how this tool will interact in the real world. The following tools can be used to carry out this test</p><ul><li>Chrome Devtools</li><li>Lighthouse</li><li>PageSpeed insight</li><li>Webpageteest</li></ul><p>Field Testing</p><p>On the other hand, while testing in the lab is a reasonable proxy for performance, it isn’t necessarily reflective of how all users experience your site in the wild. The performance of the website can vary drastically based on the user’s device and network. The following tools can be used to carry out this test</p><ul><li>Chrome User experience report</li><li>Search Console (Core Web Vital report )</li></ul><blockquote><a href="https://medium.com/@calebomojuwon/how-to-improve-user-experience-by-eliminating-layout-shift-d9e7cf83845d"><strong>IN MY NEXT ARTICLE I WILL DISCUSS IN LENGTH HOW TO OPTIMIZE CLS</strong></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4a4b79a32c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GUIDE TO REV UP YOUR LCP SCORE AND OUTPACE THE COMPETITION]]></title>
            <link>https://medium.com/@calebomojuwon/guide-to-rev-up-your-lcp-score-and-outpace-the-competition-b11194faf622?source=rss-6c9416084ab1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b11194faf622</guid>
            <category><![CDATA[web-optimization]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[lcp]]></category>
            <dc:creator><![CDATA[Omojuwon Soneye]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 13:44:29 GMT</pubDate>
            <atom:updated>2023-05-29T09:03:49.356Z</atom:updated>
            <content:encoded><![CDATA[<p>“Optimizing the Largest Contentful Paint (LCP) of a web application can greatly improve the user experience of the website and its general performance. This is a very important goal for most businesses, as better user experience leads to higher conversion rates and lower bounce rates.</p><p>However, there is no single fix that can help reduce the load time of the Largest Contentful Paint. To improve LCP, the task is broken down into smaller pieces and solved bit by bit. Improving these smaller tasks, even as little as 1% better, can, in the grand scheme of things, reduce the load time of the Largest Contentful Paint.</p><p>When a request is sent for a URL on your web browser, a sequence of tasks occurs behind the scenes before the web page is rendered. The image below shows a graphical sequence of how this occurs. Note that this process does not occur simultaneously or overlap each other. Rather, they occur in an independent sequence.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*thY8AXS1iPGZy4Z0saoTRA.png" /></figure><p>This graph table represents the sequence of activities that occurs before the page fully renders</p><p><strong>Time to first byte (TTFB)</strong></p><p>The time from when the user initiates loading the page until when the browser receives the first byte of the HTML document response.</p><p><strong>Resource load delay</strong></p><p>The time between TTFB and when the browser starts loading the LCP resource. ***</p><p><strong>Resource load time</strong></p><p>The time it takes to load the LCP resource itself. ***</p><p><strong>Element render delay</strong></p><p>The delta between when the LCP resource finishes loading until the LCP element is fully rendered.</p><p>In other to improve LCP , it is beneficial to ensure that not just one of the sub part responsible for page rendering is optimized , but all of them . However there is an ideal amount of time that each of them should take . which is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*eTpTtUp6wsWlw3K-BagluQ.png" /></figure><p>From this table, it can be noted that two parts of the sequence have the word ‘delay’ in it. Our goal should be to minimize these delays to as low as 0%, if possible. The other two sequences take the most time to load up. This is true, as network requests typically take time to load.</p><p>In some situations, where the LCP meets the target of 2.5 seconds, it would be overkill to try to ensure that each sequence in your page fits exactly to the portion in the table. These are just guidelines for optimizing LCP and not hard and fast rules.”</p><p>The following listed below are ways to optimize the various subpart</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*vZryfG44-pqMN-pYCN7EtQ.png" /></figure><h3>ELIMINATE RESOURCE DELAY</h3><p>Ideally, after the TIME TO FIRST BYTE is done, the LCP resource should start loading, but in reality, there is some delay that occurs before the LCP resource begins to load. The delay that prevents the LCP, to start loading immediately after the TIME TO FIRST BYTE are</p><ul><li>When the resource is discovered</li><li>What priority the resource is given</li></ul><p><strong>Optimize when the resource is discovered</strong></p><p>In other to ensure the LCP resource starts loading on time, it is important that the browser preload scanner is able to identify that this resource actually exists in the DOM element. The following below, enables the browser to identify the LCP, quickly</p><ul><li>The LCP element is an &lt;img&gt; element, and its src or srcset attributes are present in the initial HTML markup.</li><li>The LCP element requires a CSS background image, but that image is preloaded via &lt;link rel=&quot;preload&quot;&gt; in the HTML markup (or via a Link header).</li><li>The LCP element is a text node that requires a web font to render, and the font is loaded via &lt;link rel=&quot;preload&quot;&gt; in the HTML markup (or via a Link header).</li></ul><p>Here are some examples where the LCP resource cannot be discovered by scanning the HTML document response:</p><ul><li>The LCP element is an &lt;img&gt; that is dynamically added to the page via JavaScript.</li><li>The LCP element is lazily loaded with a JavaScript library that hides its src or srcset attributes (often as data-src or data-srcset).</li><li>The LCP element requires a CSS background image.</li></ul><p>One way to ensure that the browser is able to discover the LCP in time, especially in situations where the LCP is loaded from an eternal JavaScript or CSS file is to ensure that it is set to a fetch priority of High and it is preloaded</p><pre>&lt;link rel=&quot;preload&quot; fetchpriority=&quot;high&quot; as=&quot;image&quot; href=&quot;/path/to/hero-image.webp&quot; type=&quot;image/webp&quot;&gt;</pre><p>Optimize the priority of LCP</p><p>In the DOM, some images are lazy loaded, and this increases the load time of the image. It is advisable to always ensure that the LCP is never lazy-loaded and that the fetch priority of the LCP is always set to high. Although the preload scanner, may discover the LCP quickly, it still may not load it as soon as it is discovered. Other elements in the DOM document, may be given higher priority by the preloader.</p><h3>ELIMINATE RENDER DELAY</h3><p>This delay is an opportunity for improvement — the goal is to reduce this delay and ensure that the LCP renders as soon as the resources as been discovered.</p><p>The following are some reasons that could cause delays in rendering the LCP</p><ul><li>• The element is being hidden by some other code, such as an A/B testing library that’s still determining what experiment the user should be in.</li><li>The resource has finished loading, but it is yet to be added to the DOM as it is waiting on a javascript file to load</li><li>Rendering of the whole page is blocked due to CSS or js file in the head that is still loading</li></ul><p>Rendering of elements could be blocked till the CSS file loads up, which is good as it prevents users from seeing unstyled HTML. However, if the CSS is so large that it takes a great deal of time to load up the page even after the resources LCP has loaded could be a bad thing</p><p>The following step can be carried out to reduce the css style sheet size</p><p>Some recommendations to reduce the size of the stylesheet are:</p><ul><li><a href="https://developer.chrome.com/docs/lighthouse/performance/unused-css-rules/">Remove unused CSS</a>: use Chrome DevTools to find CSS rules that aren’t being used and can potentially be removed (or deferred).</li><li><a href="https://web.dev/defer-non-critical-css/">Defer non-critical CSS</a>: split your stylesheet out into styles that are required for initial page load and then styles that can be loaded lazily.</li><li><a href="https://web.dev/reduce-network-payloads-using-text-compression/">Minify and compress CSS</a>: for styles that are critical, make sure you’re reducing their <a href="https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize">transfer size</a> as much as possible.</li></ul><h3>REDUCE RESOURCE LOAD TIME</h3><p>Reducing the time it takes for each of your users to get the resource needed to load up the LCP. can greatly improve the LCP. The following are ways it can be done</p><h3>Reduce the size of the resource</h3><p>The size of the LCP, which most time is usually an image or a web font, can greatly affect the load-up time for this resource. The following steps can help in the reduction of this size</p><ul><li>Serve optimal image size</li></ul><p>Images sent from the server to the user screen, should ideally never be larger than the version that is rendered on the user screen. Say an image served to the server is 768 x 879px, served to a device that is 425px (mobile phone). This increases the load time and just wastes bytes.</p><ol><li>Making images responsive is a great strategy to optimize image size. Based on the pixel size of the users&#39; device , the image size that will fit that device will be served and render</li><li>Using Image CDN has proven to reduce the image size up to 40–80% of the actual size</li></ol><ul><li>Serve Images in modern formats</li></ul><p>AVIF &amp; WEBP formats are the appropriate image format that should be used to render images t the users. As they have superior compression and quality characteristics in comparison to counterparts like JPG &amp; PNG.</p><h3>Reduce the distance the resource has to travel</h3><p>Placing the images in server,closest to the user — helps in the reduction of the distance the resource has to travel and the load time</p><p>Image CDN, kills two birds with one stone, as it helps in the image size optimization and the distance the resource has to travel.</p><h3>Reduce contention for network bandwidth</h3><p>When many resources are given a priority of high priority and the LCP is also given a Priority of high. Other networks compete with the LCP, and this can greatly increase the LCP load time</p><h3>ELIMINATE NETWORK DELAY ENTIRELY</h3><p>This can be done successfully with the use of caching. When a user requests a page, the element f that page can be cached, so the user loads the cached element from the user&#39;s browser on a subsequent visit. This prevents the user from requesting for such an element again from the browser, and how long this cached element should be stored in the browser can be set.</p><h3>REDUCE TIME TO FIRST BYTE</h3><p>This is one process that developers have the least control over, although a very important step as it affects the rest sequence of load up. This will be discussed in full in my article on TIME TO FIRST BYTE</p><h3>GENERAL OVERVIEW</h3><p>To improve the LCP load time of your page, the following should be done</p><ul><li>Deliver the HTML content as early as possible</li><li>Render the LCP once the resources have finished loading</li><li>Load the LCP resource as early as possible</li><li>Reduce the LCP size without sacrificing quality</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b11194faf622" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>