Relative Content

Tag Archive for next.js

How to set the Expires header for dynamic pages in Next

Our pages in Next.js are hosted in Azure and are cached by the Azure CDN as per company policy. Because we did not want to have double caching, we disabled static page generation using export const dynamic = "force-dynamic"; on every page, and we manage page caching only using the CDN. The company policy is asking us to have both the Cache-Control and Expires headers set on every returned page for the CDN to work correctly.

Next SSR – Redirect to Same Page but with data

Trying to build something that does the following. I have a login page. If the login fails, I want to redirect to the same page but give an error message. I for the life of me cannot get anything working. Is there a way to redirect but also pass through some data?

Lightweight Login for NextJS

Hoping someone can help me out by recommending some solutions. I’m building a website and I want to have some authentication on some pages. However, I want to be able to create the usernames and passwords in a database somewhere, and not have the ability to ‘register’ via the website. Essentially, I want to be able to share a username and password with some people (it’s fine if it’s the same username and password) and only have them able to access some pages.

Next.js website update without work files

I uploaded minified Next.js files to the server, but now my work files are missing from my hand. I tried updating the phone number in the uploaded files, but the changes aren’t reflecting on the website. Is there any way to update the phone number without the source files in next.js website

Next.js website update without work files

I uploaded minified Next.js files to the server, but now my work files are missing from my hand. I tried updating the phone number in the uploaded files, but the changes aren’t reflecting on the website. Is there any way to update the phone number without the source files in next.js website

how to take production build in Nextjs

I have created Nextjs application, I am using dynamic page store/[slug]/page.js but I am using this “use client”; import { useState } from ‘react’; but could not take build how to solve facing this issue Error: Page “/store/[slug]/page” cannot use both “use client” and export function “generateStaticParams()”