Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Latest commit

 

History

History
25 lines (17 loc) · 784 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 784 Bytes

Intro to caching

This project contains a simple web site bundled with Vite and a custom web server, which intentionally introduces horrible latencies. The goal of this workshop is to configure caching headers to prevent unnecessary refetches.

Requirements

  • Node.js with npm, version 16 or above

Getting started

# Install dependencies
npm i

# Build the bundle and start a local webserver
npm run build-and-run

Important files

  • ./dist - bundle of the application created by Vite
    • ./dist/assets - immutable assets
    • ./dist/fonts - fonts
  • ./server/getHeaders.js - we will work primarily in this file
  • ./src/js/articles.js - source code for, whose client-side bundle takes a painfully long time to load