fix(assets): rename assets to v2 to bust immutable browser cache; fix /images/ cache header
- Rename all new Figma 2026 assets to *-v2.webp so browsers load fresh copies instead of serving year-old cached originals - Change Cache-Control for /images/ from immutable (1 year) to must-revalidate (1 day) — public/ files are mutable, not hashed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
@ -2,6 +2,7 @@ import { withPayload } from '@payloadcms/next/withPayload'
|
|||
import type { NextConfig } from 'next'
|
||||
|
||||
const ONE_YEAR = 'public, max-age=31536000, immutable'
|
||||
const ONE_DAY = 'public, max-age=86400, must-revalidate'
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: 'standalone',
|
||||
|
|
@ -9,10 +10,12 @@ const nextConfig: NextConfig = {
|
|||
async headers() {
|
||||
return [
|
||||
{
|
||||
// public/ images are mutable (replaced in-place) — allow daily revalidation
|
||||
source: '/images/:path*',
|
||||
headers: [{ key: 'Cache-Control', value: ONE_YEAR }],
|
||||
headers: [{ key: 'Cache-Control', value: ONE_DAY }],
|
||||
},
|
||||
{
|
||||
// _next/static/ assets have content-hashed filenames — safe to cache forever
|
||||
source: '/_next/static/:path*',
|
||||
headers: [{ key: 'Cache-Control', value: ONE_YEAR }],
|
||||
},
|
||||
|
|
|
|||
13
public/images/figma/hero-bg1-v2.webp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<svg preserveAspectRatio="none" width="100%" height="100%" overflow="visible" style="display: block;" viewBox="0 0 1287 1079" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<foreignObject x="0" y="0" width="1287" height="1079"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(2.5px);clip-path:url(#bgblur_0_0_4_clip_path);height:100%;width:100%"></div></foreignObject><g id="Subtract" opacity="0.49" filter="url(#filter0_f_0_4)" data-figma-bg-blur-radius="5">
|
||||
<path d="M1167 100C1178.05 100 1187 108.954 1187 120V385C1187 396.046 1178.05 405 1167 405H924C912.954 405 904 413.954 904 425V959C904 970.046 895.046 979 884 979H120C108.954 979 100 970.046 100 959V120C100 108.954 108.954 100 120 100H1167Z" fill="var(--fill-0, black)" fill-opacity="0.01"/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_f_0_4" x="0" y="0" width="1287" height="1079" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feGaussianBlur stdDeviation="50" result="effect1_foregroundBlur_0_4"/>
|
||||
</filter>
|
||||
<clipPath id="bgblur_0_0_4_clip_path" transform="translate(0 0)"><path d="M1167 100C1178.05 100 1187 108.954 1187 120V385C1187 396.046 1178.05 405 1167 405H924C912.954 405 904 413.954 904 425V959C904 970.046 895.046 979 884 979H120C108.954 979 100 970.046 100 959V120C100 108.954 108.954 100 120 100H1167Z"/>
|
||||
</clipPath></defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
BIN
public/images/figma/hero-bg2-v2.webp
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
public/images/figma/loc-dinopark-v2.webp
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
public/images/figma/loc-divo-lis-v2.webp
Normal file
|
After Width: | Height: | Size: 1 MiB |
BIN
public/images/figma/loc-maze-v2.webp
Normal file
|
After Width: | Height: | Size: 2.7 MiB |
BIN
public/images/figma/loc-playground-v2.webp
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
BIN
public/images/figma/loc-tir-v2.webp
Normal file
|
After Width: | Height: | Size: 943 KiB |
BIN
public/images/figma/why-parents-video-v2.webp
Normal file
|
After Width: | Height: | Size: 42 KiB |
|
|
@ -2,7 +2,7 @@
|
|||
import type { HomePageHero, Media } from '@/types/globals'
|
||||
import { BtnPrimary } from '@/components/ui/BtnPrimary'
|
||||
|
||||
const IMG_BG2 = '/images/figma/hero-bg2.webp'
|
||||
const IMG_BG2 = '/images/figma/hero-bg2-v2.webp'
|
||||
|
||||
interface HeroProps {
|
||||
hero?: HomePageHero | null
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ function getMediaUrl(img: Media | string | null | undefined): string | null {
|
|||
}
|
||||
|
||||
const FALLBACK_IMAGES: Record<string, string> = {
|
||||
dynopark: '/images/figma/loc-dinopark.webp',
|
||||
dyvolis: '/images/figma/loc-divo-lis.webp',
|
||||
maze: '/images/figma/loc-maze.webp',
|
||||
tir: '/images/figma/loc-tir.webp',
|
||||
playground: '/images/figma/loc-playground.webp',
|
||||
dynopark: '/images/figma/loc-dinopark-v2.webp',
|
||||
dyvolis: '/images/figma/loc-divo-lis-v2.webp',
|
||||
maze: '/images/figma/loc-maze-v2.webp',
|
||||
tir: '/images/figma/loc-tir-v2.webp',
|
||||
playground: '/images/figma/loc-playground-v2.webp',
|
||||
}
|
||||
|
||||
const STATIC_LOCATIONS: LocationData[] = [
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import { useState, useRef, useEffect } from 'react'
|
||||
import type { HomePageWhyParentsItem, Media } from '@/types/globals'
|
||||
|
||||
const VIDEO_THUMBNAIL = '/images/figma/why-parents-video.webp'
|
||||
const VIDEO_THUMBNAIL = '/images/figma/why-parents-video-v2.webp'
|
||||
|
||||
const STATIC_ITEMS: HomePageWhyParentsItem[] = [
|
||||
{
|
||||
|
|
|
|||