DA
Tüm yazılara dön
Core Web Vitals Optimizasyonu: Site Hızı ve Kullanıcı Deneyimi Rehberi

Core Web Vitals Optimizasyonu: Site Hızı ve Kullanıcı Deneyimi Rehberi

Core Web VitalsSite PerformancePage SpeedUser ExperienceTechnical SEO

Core Web Vitals Rehberi: Site Hızınızı Optimize Edin

2021'de Google bir bomba patlattı: "Artık site hızı ranking faktörü" dedi. O zaman çoğumuz "E, zaten hızlıydı sitemiz" dedik. Sonra Core Web Vitals ile tanıştık ve anladık ki iş sandığımızdan karmaşıkmış.

Bu metrikleri ilk gördüğümde kafam karışmıştı. LCP, FID, CLS... Ne demek bunlar? Neden böyle teknik isimler? Ama zamanla öğrendim ki bu 3 metrik, kullanıcı deneyiminin en önemli taraflarını ölçüyor.

Bu yazıda Core Web Vitals'ı basit dille anlatacağım ve nasıl optimize edeceğinizi göstereceğim.

Core Web Vitals Nedir, Neden Önemli?

Core Web Vitals, Google'ın "bu sitede kullanıcı deneyimi nasıl?" sorusuna verdiği cevap. 3 temel metrik var:

LCP (Largest Contentful Paint): Sayfanın ana içeriği ne kadar sürede yükleniyor? İdeal: 2.5 saniyeden az.

FID (First Input Delay) / INP: Kullanıcı bir şeye tıkladığında ne kadar bekliyor? İdeal: 100ms'den az.

CLS (Cumulative Layout Shift): Sayfa yüklenirken elementler zıplıyor mu? İdeal: 0.1'den az.

Basit örnekle: Bir butona tıklıyorsunuz, 3 saniye bekliyor, sonra sayfa kayıyor ve yanlış yere tıklamış oluyorsunuz. İşte CWV bunu önlüyor.

LCP (Largest Contentful Paint) Nasıl Düzeltilir?

LCP, sayfanızın en büyük içeriğinin (genelde ana görsel veya başlık) ne kadar sürede yüklendiğini ölçer. 2.5 saniyeden fazlaysa sorun var demektir.

Benim deneyimime göre en etkili düzeltme yöntemleri:

Görselleri optimize edin: Büyük resimler LCP'nin en büyük düşmanı. WebP formatı kullanın, boyutları küçültün. 1MB'lık resim yerine 200KB'lık hali genelde yeterli.

Ana görseli hemen yükleyin: Sayfanın üst kısmındaki görselde loading="eager" kullanın. Bu resmin hemen yüklenmesini sağlar.

CDN kullanın: Cloudflare, AWS CloudFront gibi servisler resimlerinizi kullanıcıya daha yakın sunuculardan sunar.

Sunucu yanıt süresini kısaltın: Hosting firmanızla alakalı. Ucuz hosting kullanıyorsanız burada sıkıntı yaşarsınız.

Gerçek hayat deneyimim: Bir müşterimin sitesinde LCP 4.2 saniyeydi. Ana görseli 2MB'dan 150KB'a düşürdük, CDN ekledik. LCP 1.8 saniyeye indi. value: Math.round(lastEntry.startTime), event_category: "performance", }); }).observe({ entryTypes: ["largest-contentful-paint"] }); };

// Hedef değerler const lcpTargets = { good: "< 2.5 seconds", needsImprovement: "2.5 - 4.0 seconds", poor: "> 4.0 seconds", };


### 2. LCP Optimizasyon Teknikleri

```javascript
// Image optimization for LCP
const optimizeImages = {
  // Modern image formats
  formats: {
    webp: "Use WebP for better compression",
    avif: "Use AVIF for even better compression",
    fallback: "Provide fallback for older browsers",
  },

  // Responsive images
  responsiveImages: `
    <picture>
      <source
        srcset="hero-mobile.webp 480w, hero-tablet.webp 768w, hero-desktop.webp 1200w"
        sizes="100vw"
        type="image/webp">
      <source
        srcset="hero-mobile.jpg 480w, hero-tablet.jpg 768w, hero-desktop.jpg 1200w"
        sizes="100vw"
        type="image/jpeg">
      <img
        src="hero-desktop.jpg"
        alt="Hero image"
        width="1200"
        height="600"
        loading="eager"
        fetchpriority="high">
    </picture>
  `,

  // Image optimization techniques
  techniques: {
    compression: "Compress images without quality loss",
    sizing: "Serve appropriate sizes for each device",
    lazyLoading: "Use lazy loading for below-fold images",
    preloading: "Preload LCP images",
  },
};

// Font loading optimization
const optimizeFonts = {
  // Font loading strategies
  strategies: {
    preload: `<link rel="preload" href="/fonts/inter.woff2" as="font" type="font/woff2" crossorigin>`,
    display: `@font-face {
      font-family: 'Inter';
      src: url('/fonts/inter.woff2') format('woff2');
      font-display: swap; /* Shows fallback font immediately */
    }`,
    subset: "Use only needed characters to reduce file size",
  },

  // Font optimization
  optimization: {
    woff2: "Use WOFF2 format for better compression",
    variableFonts: "Use variable fonts to reduce requests",
    systemFonts: "Consider system font stack as fallback",
    fontDisplay: "Use font-display: swap for faster rendering",
  },
};

3. Server-Side Optimizations

// Server optimizations for LCP
const serverOptimizations = {
  // CDN implementation
  cdn: {
    benefits: [
      "Reduced latency through edge servers",
      "Better cache hit rates",
      "Global content distribution",
      "DDoS protection",
    ],
    implementation: `
      // Cloudflare example
      const cdnUrl = 'https://cdn.yoursite.com';
      const imageSrc = \`\${cdnUrl}/images/hero.webp\`;
    `,
  },

  // Caching strategies
  caching: {
    browserCache: `
      # .htaccess
      <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType image/jpg "access plus 1 year"
        ExpiresByType image/jpeg "access plus 1 year"
        ExpiresByType image/gif "access plus 1 year"
        ExpiresByType image/png "access plus 1 year"
        ExpiresByType image/webp "access plus 1 year"
        ExpiresByType text/css "access plus 1 month"
        ExpiresByType application/pdf "access plus 1 month"
        ExpiresByType text/javascript "access plus 1 month"
        ExpiresByType application/javascript "access plus 1 month"
      </IfModule>
    `,

    serverSideCache: `
      // Next.js example
      export async function getStaticProps() {
        return {
          props: { data },
          revalidate: 3600 // Revalidate every hour
        };
      }
    `,
  },

  // Server response optimization
  serverResponse: {
    compression: "Enable Gzip/Brotli compression",
    minification: "Minify HTML, CSS, JavaScript",
    http2: "Use HTTP/2 for multiplexed connections",
    serverLocation: "Host close to target audience",
  },
};

First Input Delay (FID) / Interaction to Next Paint (INP)

1. FID ve INP Optimizasyonu

// JavaScript optimization for better FID/INP
const jsOptimization = {
  // Code splitting
  codeSplitting: {
    dynamic: `
      // React lazy loading
      const LazyComponent = lazy(() => import('./LazyComponent'));
      
      // Dynamic imports
      const loadFeature = async () => {
        const { feature } = await import('./feature');
        return feature;
      };
    `,

    bundleAnalysis: `
      // Webpack bundle analyzer
      npm install --save-dev webpack-bundle-analyzer
      
      // Analyze bundle size
      npx webpack-bundle-analyzer build/static/js/*.js
    `,
  },

  // Main thread optimization
  mainThreadOptimization: {
    deferNonCritical: `
      // Defer non-critical JavaScript
      <script src="analytics.js" defer></script>
      <script src="non-critical.js" async></script>
    `,

    webWorkers: `
      // Offload heavy tasks to web workers
      const worker = new Worker('heavy-calculation.js');
      worker.postMessage(data);
      worker.onmessage = (event) => {
        console.log('Result:', event.data);
      };
    `,

    requestIdleCallback: `
      // Run non-critical tasks during idle time
      if ('requestIdleCallback' in window) {
        requestIdleCallback(() => {
          // Non-critical work
          trackAnalytics();
        });
      } else {
        // Fallback for older browsers
        setTimeout(trackAnalytics, 100);
      }
    `,
  },
};

// Event handler optimization
const eventOptimization = {
  // Passive event listeners
  passiveListeners: `
    // Use passive listeners for better scroll performance
    element.addEventListener('touchstart', handleTouch, { passive: true });
    element.addEventListener('scroll', handleScroll, { passive: true });
  `,

  // Event delegation
  eventDelegation: `
    // Instead of multiple listeners
    document.getElementById('container').addEventListener('click', (e) => {
      if (e.target.matches('.button')) {
        handleButtonClick(e);
      }
    });
  `,

  // Debouncing and throttling
  performanceOptimization: `
    // Debounce for search input
    const debounce = (func, wait) => {
      let timeout;
      return function executedFunction(...args) {
        const later = () => {
          clearTimeout(timeout);
          func(...args);
        };
        clearTimeout(timeout);
        timeout = setTimeout(later, wait);
      };
    };
    
    // Throttle for scroll events
    const throttle = (func, limit) => {
      let inThrottle;
      return function() {
        const args = arguments;
        const context = this;
        if (!inThrottle) {
          func.apply(context, args);
          inThrottle = true;
          setTimeout(() => inThrottle = false, limit);
        }
      };
    };
  `,
};

2. Third-Party Script Management

// Third-party script optimization
const thirdPartyOptimization = {
  // Script loading strategies
  loadingStrategies: {
    defer: "Load after HTML parsing",
    async: "Load in parallel with HTML parsing",
    lazy: "Load only when needed",
    preconnect: "Establish early connections",
  },

  // Implementation examples
  implementation: `
    <!-- Preconnect to third-party domains -->
    <link rel="preconnect" href="https://www.google-analytics.com">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    
    <!-- Lazy load non-critical scripts -->
    <script>
      // Load analytics only when page is interactive
      window.addEventListener('load', () => {
        const script = document.createElement('script');
        script.src = 'https://www.google-analytics.com/analytics.js';
        script.async = true;
        document.head.appendChild(script);
      });
    </script>
  `,

  // Script optimization
  optimization: {
    audit: "Regularly audit third-party scripts",
    alternatives: "Consider lighter alternatives",
    selfHost: "Self-host when possible",
    remove: "Remove unused scripts",
  },
};

Cumulative Layout Shift (CLS) Optimizasyonu

1. Layout Shift Prevention

/* CLS optimization with CSS */

/* Image placeholders */
.image-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background-color: #f0f0f0;
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Font loading optimization */
@font-face {
  font-family: "WebFont";
  src: url("webfont.woff2") format("woff2");
  font-display: swap;
  /* Use fallback metrics to match web font */
  size-adjust: 100.06%;
  ascent-override: 105%;
  descent-override: 35%;
  line-gap-override: 10%;
}

/* Ad space reservation */
.ad-container {
  width: 300px;
  height: 250px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

/* Dynamic content containers */
.dynamic-content {
  min-height: 200px; /* Reserve space for content */
  background: linear-gradient(90deg, #f0f0f0 25%, transparent 25%);
  background-size: 20px 20px;
}

2. JavaScript ile CLS Kontrolü

// CLS measurement and prevention
const preventLayoutShifts = {
  // Measure CLS
  measureCLS: () => {
    let clsValue = 0;
    let clsEntries = [];

    const observer = new PerformanceObserver((entryList) => {
      for (const entry of entryList.getEntries()) {
        if (!entry.hadRecentInput) {
          clsValue += entry.value;
          clsEntries.push(entry);
        }
      }

      console.log("Current CLS:", clsValue);
    });

    observer.observe({ entryTypes: ["layout-shift"] });
  },

  // Dynamic content handling
  handleDynamicContent: `
    // Reserve space before loading content
    const reserveSpace = (element, height) => {
      element.style.minHeight = height + 'px';
    };
    
    // Load content
    const loadContent = async (element) => {
      reserveSpace(element, 200);
      
      try {
        const content = await fetchContent();
        element.innerHTML = content;
      } catch (error) {
        element.innerHTML = 'Error loading content';
      }
    };
  `,

  // Image loading with dimensions
  imageOptimization: `
    // Always specify image dimensions
    const createOptimizedImage = (src, alt, width, height) => {
      const img = document.createElement('img');
      img.src = src;
      img.alt = alt;
      img.width = width;
      img.height = height;
      img.loading = 'lazy';
      return img;
    };
    
    // Use aspect ratio boxes for responsive images
    const createResponsiveImage = (src, alt, aspectRatio) => {
      const container = document.createElement('div');
      container.style.aspectRatio = aspectRatio;
      container.style.width = '100%';
      
      const img = document.createElement('img');
      img.src = src;
      img.alt = alt;
      img.style.width = '100%';
      img.style.height = '100%';
      img.style.objectFit = 'cover';
      
      container.appendChild(img);
      return container;
    };
  `,
};

Modern Web Performance Teknikleri

1. Next.js Performance Optimizations

// Next.js specific optimizations
const nextjsOptimizations = {
  // Image component optimization
  imageComponent: `
    import Image from 'next/image';
    
    // Optimized image with priority loading
    <Image
      src="/hero.jpg"
      alt="Hero image"
      width={1200}
      height={600}
      priority // Load immediately for above-fold content
      placeholder="blur"
      blurDataURL="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ..."
    />
    
    // Responsive image with sizes
    <Image
      src="/responsive.jpg"
      alt="Responsive image"
      fill
      sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
      style={{ objectFit: 'cover' }}
    />
  `,

  // Script component optimization
  scriptComponent: `
    import Script from 'next/script';
    
    // Load analytics after page is interactive
    <Script
      src="https://www.google-analytics.com/analytics.js"
      strategy="afterInteractive"
    />
    
    // Load non-critical scripts lazily
    <Script
      src="/third-party-widget.js"
      strategy="lazyOnload"
    />
  `,

  // Font optimization
  fontOptimization: `
    import { Inter } from 'next/font/google';
    
    const inter = Inter({
      subsets: ['latin'],
      display: 'swap',
      preload: true,
    });
    
    export default function Layout({ children }) {
      return (
        <html className={inter.className}>
          <body>{children}</body>
        </html>
      );
    }
  `,
};

2. Service Worker ile Performance

// Service worker for performance
const serviceWorkerOptimizations = {
  // Cache strategy
  cacheStrategy: `
    // Cache-first strategy for images
    workbox.routing.registerRoute(
      ({ request }) => request.destination === 'image',
      new workbox.strategies.CacheFirst({
        cacheName: 'images',
        plugins: [
          new workbox.expiration.ExpirationPlugin({
            maxEntries: 60,
            maxAgeSeconds: 30 * 24 * 60 * 60, // 30 Days
          }),
        ],
      })
    );
    
    // Network-first strategy for API calls
    workbox.routing.registerRoute(
      ({ url }) => url.pathname.startsWith('/api/'),
      new workbox.strategies.NetworkFirst({
        cacheName: 'api-cache',
        networkTimeoutSeconds: 3,
      })
    );
  `,

  // Preloading strategy
  preloadingStrategy: `
    // Preload critical resources
    const CRITICAL_RESOURCES = [
      '/',
      '/styles/critical.css',
      '/scripts/critical.js'
    ];
    
    self.addEventListener('install', (event) => {
      event.waitUntil(
        caches.open('critical-v1').then((cache) => {
          return cache.addAll(CRITICAL_RESOURCES);
        })
      );
    });
  `,
};

Performance Monitoring ve Analytics

1. Real User Monitoring (RUM)

// Real User Monitoring implementation
const realUserMonitoring = {
  // Web Vitals measurement
  webVitalsTracking: `
    import { getCLS, getFID, getFCP, getLCP, getTTFB } from 'web-vitals';
    
    function sendToAnalytics(metric) {
      gtag('event', 'web_vitals', {
        name: metric.name,
        value: Math.round(metric.value),
        event_category: 'performance',
        custom_map: { metric_id: 'ga_metric_id' }
      });
    }
    
    getCLS(sendToAnalytics);
    getFID(sendToAnalytics);
    getFCP(sendToAnalytics);
    getLCP(sendToAnalytics);
    getTTFB(sendToAnalytics);
  `,

  // Custom performance tracking
  customTracking: `
    // Track page load performance
    window.addEventListener('load', () => {
      const navigation = performance.getEntriesByType('navigation')[0];
      
      const metrics = {
        dns: navigation.domainLookupEnd - navigation.domainLookupStart,
        tcp: navigation.connectEnd - navigation.connectStart,
        ttfb: navigation.responseStart - navigation.requestStart,
        download: navigation.responseEnd - navigation.responseStart,
        domParse: navigation.domContentLoadedEventEnd - navigation.responseEnd,
        total: navigation.loadEventEnd - navigation.navigationStart
      };
      
      // Send to analytics
      Object.entries(metrics).forEach(([name, value]) => {
        gtag('event', 'timing_complete', {
          name: name,
          value: Math.round(value)
        });
      });
    });
  `,

  // Performance budget monitoring
  budgetMonitoring: `
    const PERFORMANCE_BUDGET = {
      lcp: 2500,
      fid: 100,
      cls: 0.1,
      totalSize: 1024 * 1024, // 1MB
      scriptSize: 512 * 1024   // 512KB
    };
    
    const checkBudget = (metric) => {
      const budget = PERFORMANCE_BUDGET[metric.name.toLowerCase()];
      if (budget && metric.value > budget) {
        // Alert development team
        console.warn(\`Performance budget exceeded for \${metric.name}\`);
        
        // Send alert to monitoring service
        sendAlert({
          type: 'performance_budget_exceeded',
          metric: metric.name,
          value: metric.value,
          budget: budget,
          url: window.location.href
        });
      }
    };
  `,
};

2. Performance Testing ve Monitoring

// Automated performance testing
const performanceTesting = {
  // Lighthouse CI integration
  lighthouseCi: `
    // .lighthouserc.js
    module.exports = {
      ci: {
        collect: {
          numberOfRuns: 3,
          settings: {
            chromeFlags: '--no-sandbox'
          }
        },
        assert: {
          assertions: {
            'categories:performance': ['error', { minScore: 0.9 }],
            'categories:accessibility': ['error', { minScore: 0.9 }],
            'categories:best-practices': ['error', { minScore: 0.9 }],
            'categories:seo': ['error', { minScore: 0.9 }]
          }
        },
        upload: {
          target: 'lhci',
          serverBaseUrl: 'https://your-lhci-server.com'
        }
      }
    };
  `,

  // Continuous monitoring
  continuousMonitoring: `
    // GitHub Actions workflow
    name: Performance Monitor
    
    on:
      schedule:
        - cron: '0 */6 * * *' # Every 6 hours
      push:
        branches: [main]
    
    jobs:
      performance:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v2
          - name: Run Lighthouse CI
            run: |
              npm install -g @lhci/cli
              lhci autorun
  `,

  // Performance alerts
  alerting: `
    const performanceAlert = {
      thresholds: {
        lcp: 2500,
        fid: 100,
        cls: 0.1
      },
      
      checkAndAlert: (metrics) => {
        Object.entries(metrics).forEach(([metric, value]) => {
          if (value > performanceAlert.thresholds[metric]) {
            sendSlackAlert({
              message: \`⚠️ Performance Alert: \${metric.toUpperCase()} = \${value}ms\`,
              url: window.location.href,
              threshold: performanceAlert.thresholds[metric]
            });
          }
        });
      }
    };
  `,
};

Mobile Performance Optimization

1. Mobile-Specific Optimizations

// Mobile performance optimizations
const mobileOptimizations = {
  // Connection-aware loading
  connectionAware: `
    // Adapt content based on connection speed
    const connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
    
    if (connection) {
      const connectionType = connection.effectiveType;
      
      switch (connectionType) {
        case 'slow-2g':
        case '2g':
          // Load minimal content
          loadLowQualityImages();
          disableAutoplay();
          break;
        case '3g':
          // Load medium quality content
          loadMediumQualityImages();
          break;
        case '4g':
        default:
          // Load full quality content
          loadHighQualityImages();
          enableAutoplay();
      }
    }
  `,

  // Touch optimization
  touchOptimization: `
    // Improve touch responsiveness
    * {
      touch-action: manipulation; /* Prevents 300ms click delay */
    }
    
    .button {
      min-height: 44px; /* Minimum touch target size */
      min-width: 44px;
    }
    
    /* Prevent text selection on UI elements */
    .ui-element {
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
    }
  `,

  // Viewport optimization
  viewportOptimization: `
    <!-- Optimal viewport meta tag -->
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
    
    /* CSS for safe areas (iPhone X notch) */
    .safe-area {
      padding-left: env(safe-area-inset-left);
      padding-right: env(safe-area-inset-right);
    }
  `,
};

2. Progressive Enhancement

// Progressive enhancement for performance
const progressiveEnhancement = {
  // Feature detection
  featureDetection: `
    // Check for modern browser features
    const supportsModernFeatures = {
      webp: () => {
        const canvas = document.createElement('canvas');
        return canvas.toDataURL('image/webp').indexOf('webp') > -1;
      },
      
      lazyLoading: () => 'loading' in HTMLImageElement.prototype,
      
      intersectionObserver: () => 'IntersectionObserver' in window,
      
      serviceWorker: () => 'serviceWorker' in navigator
    };
    
    // Progressive image loading
    if (supportsModernFeatures.lazyLoading()) {
      // Use native lazy loading
      document.querySelectorAll('img').forEach(img => {
        img.loading = 'lazy';
      });
    } else if (supportsModernFeatures.intersectionObserver()) {
      // Use Intersection Observer polyfill
      implementIntersectionObserverLazyLoading();
    }
  `,

  // Graceful degradation
  gracefulDegradation: `
    // Provide fallbacks for modern features
    .feature {
      /* Fallback styles */
      background-color: #f0f0f0;
    }
    
    @supports (display: grid) {
      .feature {
        /* Enhanced styles for modern browsers */
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      }
    }
    
    /* JavaScript enhancement */
    if (CSS.supports('display', 'grid')) {
      // Use advanced layout features
      implementAdvancedLayout();
    }
  `,
};

Performance Best Practices Checklist

1. Teknik Optimizasyon Checklist

// Performance optimization checklist
const performanceChecklist = {
  // Critical Path Optimization
  criticalPath: [
    "✅ Minimize critical resources",
    "✅ Optimize critical file sizes",
    "✅ Prioritize critical content",
    "✅ Eliminate render-blocking resources",
  ],

  // Image Optimization
  images: [
    "✅ Use modern image formats (WebP, AVIF)",
    "✅ Implement responsive images",
    "✅ Add proper alt attributes",
    "✅ Set explicit dimensions",
    "✅ Use lazy loading for below-fold images",
    "✅ Optimize image compression",
  ],

  // JavaScript Optimization
  javascript: [
    "✅ Code splitting and lazy loading",
    "✅ Remove unused JavaScript",
    "✅ Minimize and compress JS files",
    "✅ Use defer/async attributes",
    "✅ Optimize third-party scripts",
    "✅ Implement service worker caching",
  ],

  // CSS Optimization
  css: [
    "✅ Minimize and compress CSS",
    "✅ Remove unused CSS",
    "✅ Optimize critical CSS delivery",
    "✅ Use efficient CSS selectors",
    "✅ Minimize layout shifts",
  ],

  // Server Optimization
  server: [
    "✅ Enable compression (Gzip/Brotli)",
    "✅ Optimize server response time",
    "✅ Use CDN for static assets",
    "✅ Implement proper caching headers",
    "✅ Use HTTP/2 or HTTP/3",
    "✅ Optimize database queries",
  ],
};

2. Monitoring ve Maintenance

// Ongoing performance maintenance
const performanceMaintenance = {
  // Regular audits
  regularAudits: {
    frequency: "Weekly",
    tools: ["Lighthouse", "WebPageTest", "GTmetrix"],
    metrics: ["Core Web Vitals", "Page Speed", "Bundle Size"],
    reporting: "Automated dashboard with alerts",
  },

  // Performance budget
  performanceBudget: {
    totalPageWeight: "< 1MB",
    javascriptBudget: "< 512KB",
    cssBudget: "< 100KB",
    imagesBudget: "< 500KB",
    fontsBudget: "< 100KB",
  },

  // Continuous improvement
  continuousImprovement: {
    strategy: "Iterative optimization based on data",
    testing: "A/B test performance improvements",
    monitoring: "Real user monitoring (RUM)",
    alerts: "Performance regression alerts",
  },
};

Gerçek Hayat Deneyimi

İlk web sitem çok yavaştı. PageSpeed skoru 28/100'dü. Kullanıcılar siteyi terk ediyordu.

Core Web Vitals'ı öğrenmeye başladığımda sorunları gördüm:

  • Ana görselim 3MB'dı
  • JavaScript çok ağırdı
  • Mobil deneyim berbattı

6 ay çalışarak skoru 95'e çıkardım. Traffic %40 arttı.

Pratik optimizasyon adımları:

  1. Görselleri WebP formatına çevirin
  2. Ana görseli 500KB altına düşürün
  3. Gereksiz JavaScript'leri silin
  4. CDN kurun (Cloudflare ücretsiz)
  5. Lazy loading ekleyin

Sonuç

Core Web Vitals karmaşık gelebilir ama sabırla her site optimize edilebilir. Google PageSpeed Insights ile başlayın, size ne yapacağınızı söylüyor.

Unutmayın: Hızlı site = mutlu kullanıcı = daha fazla satış.

Hemen Başlayın:

  1. Current performance audit (Lighthouse, PageSpeed Insights)
  2. Core Web Vitals measurement setup
  3. Image optimization implementation
  4. JavaScript optimization (code splitting, lazy loading)
  5. Server-side optimization (CDN, caching, compression)
  6. Real user monitoring kurulumu
  7. Performance budget tanımlama

Kritik Başarı Faktörleri:

  • Measurement first: Önce ölçün, sonra optimize edin
  • User-centric approach: Kullanıcı deneyimi odaklı optimizasyon
  • Continuous monitoring: Sürekli izleme ve iyileştirme
  • Mobile-first: Mobil performans öncelik
  • Budget-driven: Performance budget ile kontrollü geliştirme

Unutmayın:

  • Performance is a feature: Hız da bir özelliktir
  • Progressive enhancement: Temel deneyimden başlayın
  • Real user data: Gerçek kullanıcı verilerini takip edin
  • Balance optimization: Geliştirme hızı ile performans arasında denge kurun

Core Web Vitals optimizasyonu tek seferlik bir işlem değil, sürekli bir süreçtir. Düzenli monitoring, testing ve optimization ile hem kullanıcı deneyimini hem de SEO performansınızı artırabilirsiniz.