<script>
(function() {
    var path = window.location.pathname;
    var lowerPath = path.toLowerCase();
    var is404Self = /^\/(error404|404)(\.html)?\/?$/.test(lowerPath);

    // If intentionally viewing the 404 page itself, do not auto-redirect
    if (is404Self) {
        return;
    }

    var banner = document.getElementById('redirect-banner');
    var titleEl = document.getElementById('redirect-title');
    var messageEl = document.getElementById('redirect-message');
    var redirectNowBtn = document.getElementById('redirect-now-btn');
    var cancelBtn = document.getElementById('redirect-cancel-btn');

    if (!banner || !titleEl || !messageEl || !redirectNowBtn || !cancelBtn) {
        return;
    }

    var targetUrl = '';
    var secondsLeft = 10;

    if (path !== lowerPath) {
        // Case 1: Uppercase typo auto-correction
        targetUrl = lowerPath + window.location.search + window.location.hash;
        secondsLeft = 4;
        titleEl.textContent = 'Address Auto-Correction';
        messageEl.innerHTML = 'The requested address contains uppercase characters. Redirecting to <strong>' + lowerPath + '</strong> in <strong id="redirect-countdown">' + secondsLeft + '</strong> seconds...';
        redirectNowBtn.textContent = 'Redirect Now';
        redirectNowBtn.href = targetUrl;
    } else {
        // Case 2: Missing page -> Home recovery
        targetUrl = '/';
        secondsLeft = 10;
        titleEl.textContent = 'Page Not Found';
        messageEl.innerHTML = 'The page you requested could not be found. Taking you back to the <strong>Home page</strong> in <strong id="redirect-countdown">' + secondsLeft + '</strong> seconds...';
        redirectNowBtn.textContent = 'Go to Home Now';
        redirectNowBtn.href = targetUrl;
    }

    banner.style.display = 'block';
    var countdownEl = document.getElementById('redirect-countdown');

    var timer = setInterval(function() {
        secondsLeft--;
        if (countdownEl) countdownEl.textContent = secondsLeft;
        if (secondsLeft <= 0) {
            clearInterval(timer);
            window.location.replace(targetUrl);
        }
    }, 1000);

    redirectNowBtn.addEventListener('click', function(e) {
        e.preventDefault();
        clearInterval(timer);
        window.location.replace(targetUrl);
    });

    cancelBtn.addEventListener('click', function() {
        clearInterval(timer);
        banner.innerHTML = '<div class="error-redirect-glass-inner"><div class="error-redirect-info"><p class="error-redirect-glass-message">Auto-redirect cancelled. You can continue browsing below or using the search feature.</p></div></div>';
    });
})();
</script>

## Wooooah!

Sorry, but the page you asked for does not exist or has been relocated.

Do you mind using the Search feature by pressing <kbd>/</kbd> or <kbd>Ctrl+K</kbd> (or using the recovery resources below) to find what you are looking for?

### Agent & Crawler Recovery Resources

- **Agent Guidance & When to Use**: [`/llms.txt`](~/llms.txt)
- **Full Machine-Readable Manifest**: [`/llms-full.txt`](~/llms-full.txt)
- **XML Sitemap**: [`/sitemap.xml`](~/sitemap.xml)
- **Raw Markdown Archive**: Direct Markdown files available at `/raw/<slug>.md`

### Site Navigation

- [**Home / Latest Articles**](xref:home): Browse the newest published blog posts.
- [**Blog Archive**](xref:blog): Complete historical directory of all technical articles.
- [**Topic Tags Index**](xref:tags-index): Filter posts by technologies (.NET, Google AI, Tooling, Community, Architecture).
- [**About Jochen Kirstätter**](xref:about): Biography, Microsoft MVP & Google Developer Expert background.
- [**Contact**](xref:contact): Direct email, social channels, and local community events.
- [**Privacy Policy**](xref:privacy): Information on data transparency, analytics, and cookies.

Thanks and enjoy reading this blog.

Cheers, JoKi
