Hey Andrew, I implemented the criticalcss etc. like you:
{# -- Critical CSS -- #}
{#
# Use Nginx Server Sider Includes (SSI) to render different HTML depending on
# the value in the `critical-css` cookie. ref: http://nginx.org/en/docs/http/ngx_http_ssi_module.html
#}
{% set cssHash = craft.vite.getCssHash("src/js/app.ts") %}
{#
# If the `critical-css` cookie is set, the client already has the CSS file download,
# so don't include the critical CSS, and load the full stylesheet(s) synchronously
#}
<!-- # if expr="$HTTP_COOKIE=/critical\-css\={{ cssHash }}/" -->
{{ craft.vite.script("src/js/app.ts", false) }}
<!-- # else -->
{#
# If the cookie is not set, set the cookie, then include the critical CSS for this page,
# and load the full stylesheet(s) asychronously
#}
<script>
Cookie.set("critical-css", "{{ cssHash }}", {expires: "7D", secure: true});
</script>
{{ craft.vite.includeCriticalCssTags(criticalPath) }}
{{ craft.vite.script("src/js/app.ts", true) }}
<!-- # endif -->
I also have ssi on; on my forge nginx config.
But my HTML looks all the time like this:
Question
Hey Andrew, I implemented the criticalcss etc. like you:
I also have![image](https://user-images.githubusercontent.com/764292/152494253-3008b51c-9673-437c-9406-0ff217f84071.png)
ssi on;
on my forge nginx config. But my HTML looks all the time like this:It's live here: https://stage.baukasten.io
Is there something what I miss on config side? 🤔 Looked at on devmode.fm and there are no SSI snippets to see. What means it works on your site :D