Home / Companies / Netlify / Blog / Post Details
Content Deep Dive

Personalize your static site based on a previous site referral

Blog post from Netlify

Post Details
Company
Date Published
Author
Salma Alam-Naylor
Word Count
2,449
Language
English
Hacker News Points
-
Summary

The tutorial demonstrates how to personalize a static HTML page based on the HTTP referer header using Netlify Edge Functions. The author, Salma Alam-Naylor, shares their experiment where they show friendly messages on their website based on the site they came from, and explains how this can be achieved using Edge Functions without relying on client-side JavaScript. The tutorial covers the steps to set up an Edge Function, modify the HTML response, and test the code in development and production environments. It also provides bonus content on using environment variables for contextual personalization.