Skip to content
JulienArbelliniPublic

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Green IT - Tesla

Optimization

Fonts

Converted fonts to WOFF2 format with an English character set.

Size: 169kb -> 13kb

Use font swap.

Images

Images converted to AVIF and WebP or MozJPEG format.

Images are lazy loaded.

Responsive images with multiple breakpoints.

Favicon

Default to an SVG favicon, then fallback to PNG. Add a fake favicon.ico to avoid 404 errors.

Hosting

Deployed to Vercel, hard cached behind Cloudflare.

Serverless function = zero energy consumption while cached.

Serverless function located in the US in case of cache bust, because that's the main market of Tesla.

Compression GZIP/Brotli enabled.

Framework

SvelteKit with no client side rendering. No JS shipped to the client. Total of 600bytes of JavaScript for text animations and image transitions

Video

Video converted to AV1 and VP9 format. Disabled autoplay.

  • Original MP4 (h264) -> 24mb
  • Converted to AV1 -> 4.2mb
  • Converted to VP9 -> 6mb

Accessibility

Use of semantic HTML tags.

Alt tags added to images.

SEO

Add OG and Twitter tags.

Site map generated.

Robots.txt generated.

Performance

CSS and JavaScript code inlined in the HTML to reduce requests.

Tailwind classes are sorted by specificity to reduce the size of the CSS once compressed.

Score

Google Lighthouse

Resultat LightHouse

Score LightHouse:

Detail LightHouse Mobile:

Detail LightHouse Desktop:

LightHouse Site de Tesla

Score LightHouse:

Detail LightHouse Mobile:

Detail LightHouse Desktop:

EcoIndex

Resultat EcoIndex

EcoIndex Site de Tesla

GTmetrix

Resultat GTmetrix

GTmetrix Site de Tesla

CarbonIndex

Resultat CarbonIndex

CarbonIndex Site de Tesla

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages