Erstellt: 24. Oktober 2025
Zweck: Konkrete Massnahmen zur Verbesserung von Core Web Vitals und PageSpeed Score
Performance-Optimierung ist entscheidend für SEO (Google Ranking-Faktor) und Nutzererlebnis. Dieser Guide fokussiert auf:
Ziel: < 2.5 Sekunden
Was es misst: Zeit bis grösstes sichtbares Element geladen ist
Optimierungen:
Ziel: < 0.1
Was es misst: Visuelle Stabilität (unerwartete Layout-Shifts)
Optimierungen:
font-display: swap ladenZiel: INP < 200ms, FID < 100ms
Was es misst: Interaktivität/Reaktionszeit
Optimierungen:
# _config.yml (bereits vorhanden)
compress_html:
clippings: all
ignore:
envs: development
# _config.yml (bereits aktiviert)
sass:
sass_dir: _sass
style: compressed
Beispiel für async CSS:
<!-- _includes/head.html -->
<link rel="preload" href="/assets/css/main.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/assets/css/main.css"></noscript>
Beispiel:
<!-- Defer non-critical JS -->
<script defer src="/assets/js/main.min.js"></script>
Vorteile:
Implementierung:
<picture>
<source srcset="image.avif" type="image/avif">
<source srcset="image.webp" type="image/webp">
<img src="image.jpg" alt="Description" width="800" height="600">
</picture>
<img src="image.jpg" alt="Description" loading="lazy" width="800" height="600">
Jekyll Plugin (optional):
# Gemfile
gem 'jekyll-imagemagick' # Auto-Resize & Convert
<img
src="image-800.jpg"
srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w"
sizes="(max-width: 600px) 400px, (max-width: 1200px) 800px, 1200px"
alt="Description"
width="800"
height="600"
loading="lazy">
Batch-Kompression:
# Alle JPGs im Verzeichnis komprimieren
find assets/images -name "*.jpg" -exec mogrify -quality 85 -strip {} \;
# WebP-Konvertierung
for img in assets/images/*.jpg; do
cwebp -q 85 "$img" -o "${img%.jpg}.webp"
done
<!-- _includes/head.html -->
<link rel="preload" href="https://cdn.jsdelivr.net/.../fontawesome.min.css" as="style" onload="...">
Beispiel:
@font-face {
font-family: 'Custom Font';
src: url('/assets/fonts/font.woff2') format('woff2');
font-display: swap; /* Wichtig für CLS */
font-weight: 400;
font-style: normal;
}
<!-- Preconnect für schnellere Verbindung -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Font mit display=swap -->
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
GitHub Pages Limitation:
.htaccess oder Server-ConfigAlternative: Service Worker (PWA)
// sw.js - Service Worker für Offline-Caching
const CACHE_NAME = 'ppt-v1';
const urlsToCache = [
'/',
'/assets/css/main.css',
'/assets/js/main.min.js'
];
self.addEventListener('install', event => {
event.waitUntil(
caches.open(CACHE_NAME)
.then(cache => cache.addAll(urlsToCache))
);
});
self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request)
.then(response => response || fetch(event.request))
);
});
Falls Custom Domain mit Cloudflare:
Lazy-load Giscus:
<!-- Nur laden wenn in Viewport -->
<div id="giscus-container"></div>
<script>
const observer = new IntersectionObserver((entries) => {
if (entries[0].isIntersecting) {
const script = document.createElement('script');
script.src = 'https://giscus.app/client.js';
script.async = true;
document.getElementById('giscus-container').appendChild(script);
observer.disconnect();
}
});
observer.observe(document.getElementById('giscus-container'));
</script>
Schritte:
https://www.powerplatformtip.com| Metrik | Desktop (Vorher) | Desktop (Nachher) | Mobile (Vorher) | Mobile (Nachher) |
|---|---|---|---|---|
| Performance Score | [Wert] | [Ziel: > 90] | [Wert] | [Ziel: > 85] |
| LCP | [Wert] | [< 2.5s] | [Wert] | [< 2.5s] |
| CLS | [Wert] | [< 0.1] | [Wert] | [< 0.1] |
| INP/FID | [Wert] | [< 200ms] | [Wert] | [< 200ms] |
# .github/workflows/lighthouse.yml
name: Lighthouse CI
on: [push, pull_request]
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: treosh/lighthouse-ci-action@v9
with:
urls: |
https://www.powerplatformtip.com
https://www.powerplatformtip.com/about/
uploadArtifacts: true
# Batch-Optimierung
find assets/images -name "*.jpg" -exec mogrify -quality 80 {} \;
<!-- Alle Bilder im Content -->
<img src="..." alt="..." loading="lazy" width="..." height="...">
<script defer src="..."></script>
<head><link rel="preconnect" href="https://fonts.googleapis.com">
Vor jeder grösseren Performance-Änderung:
bundle exec jekyll serve)Definition: Maximale Grössen für Ressourcen, die nicht überschritten werden dürfen
| Ressourcentyp | Budget |
|---|---|
| HTML | < 50 KB |
| CSS (total) | < 100 KB |
| JavaScript (total) | < 150 KB |
| Bilder (pro Seite) | < 500 KB |
| Fonts | < 100 KB |
| Total Page Weight | < 1 MB |
Enforcement:
# .github/workflows/performance-budget.yml (optional)
# Warnung bei Überschreitung des Budgets
assets/images/ komprimierenloading="lazy" für alle Content-BilderVerantwortlich: Dev-Team / Marcel Lehmann
Review: Wöchentlich (PageSpeed Check)
Nächster Meilenstein: PageSpeed Score > 90 (Desktop), > 85 (Mobile)
Interested in training or personalized coaching to enhance your PowerPlatform skills? 🚀 Book a package with me at thepoweraddicts.ch and benefit from customized strategies for your success. 💡