Google’s search algorithms are crystal clear: page speed and Core Web Vitals directly affect your search rank. If your website takes 4 or 5 seconds to load on a mobile 4G network, Google will silently push you down the search rankings in favor of faster competitors.
Many developers try to fix this by blindly installing heavy cache plugins or throwing more money at expensive servers. But in 90% of cases, poor load time is caused by just 4 avoidable mistakes: oversized images, render-blocking scripts, uncompressed server responses, and absent browser caching.
Let’s walk through the exact steps to fix these issues.
Step 1: Optimize and Convert Images to WebP / AVIF
Images account for over 60% of total webpage weight on the web. Serving a raw 3MB JPEG directly from your phone camera or Photoshop will destroy your page load metrics.
- Switch to WebP / AVIF: WebP files are typically 30% to 50% smaller than equivalent JPEGs without visible loss in quality. Tools like Squoosh or sharp can convert your assets in seconds.
- Set Explicit Dimensions: Always specify
widthandheighton your<img>tags. This prevents Cumulative Layout Shift (CLS), which Google measures strictly. - Use Native Lazy Loading: Add
loading="lazy"on all below-the-fold images so the browser only fetches them as the user scrolls down.
Step 2: Enable Gzip Compression & Browser Caching via .htaccess
If your website is hosted on Apache or cPanel (which powers millions of sites across India), you must ensure your server compresses text files (HTML, CSS, JS) before sending them across the wire.
Here is the production-ready .htaccess configuration snippet you can drop into your root directory:
# Enable Gzip / Deflate Compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
AddOutputFilterByType DEFLATE application/javascript application/json
AddOutputFilterByType DEFLATE image/svg+xml
</IfModule>
# Enable Long-Term Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
</IfModule>
This single change can reduce your CSS and JS network payload by up to 70%, slashing milliseconds off your Time to Interactive (TTI).
Step 3: Eliminate Render-Blocking Scripts
When the browser parses your HTML and hits a <script src="bundle.js"></script> tag without any attributes, it completely pauses rendering until the file is downloaded and executed.
defer or async on non-critical JavaScript.
- Use defer for scripts that need to run in document order after the DOM is ready (like your main animation or form handlers).
- Use async for independent analytics trackers that don’t interact with your UI layout.
Step 4: Smart Font Loading Strategy
Google Fonts are beautiful, but naive implementation creates Flash of Invisible Text (FOIT). Here is how to load external fonts with zero layout thrashing:
<!-- Preconnect to the font CDN origins -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;600&display=swap" rel="stylesheet" />
The display=swap parameter tells the browser to instantly display system fonts while the custom web font is downloading, eliminating jarring blank text delays.
Step 5: Reduce TTFB (Time to First Byte) on Shared Hosting
If you are on Indian shared cPanel hosting (like Hostinger, BigRock, or GoDaddy), TTFB is often high because servers are under resource contention. Here are three quick fixes:
- Upgrade to PHP 8.2 or 8.3: In your cPanel "MultiPHP Manager", select PHP 8.2+. PHP 8.x is significantly faster and uses less memory than old PHP 7.4.
- Use Cloudflare CDN (Free Tier): Putting Cloudflare in front of your domain caches your static assets on edge servers in Delhi, Mumbai, and Chennai, delivering instantaneous responses to Indian users.
- Keep Database Queries Lean: Always index lookup columns in MySQL and avoid
SELECT *queries on large tables.
Is your website feeling slow or losing mobile leads?
I perform in-depth performance audits and code refactoring to get your site into the green 90+ zone on Google PageSpeed.
Request a speed audit →