Next.js Discord

Discord Forum

SSG based not only on URL, but cookies, too

Unanswered
Georgi Vatsov posted this in #help-forum
Open in Discord
My project has different content based on users' country, preferred language and type of device. But I have only one URL and the mentioned parameters are respected as cookies. Example: /category/foo would have different content for user from Bulgaria or USA; mobile or desktop; Spanish or English, etc. The content for these pages rarely changes. Some of the countries and languages are more important for the project and I'd like to optimize them for performance. What are my options? I was thinking of some rewrite rules in a middleware, but then how to approach the client-side navigation? Any ideas are highly appreciated.

0 Replies