Skip to content

Send cache headers in dev mode to not to cache #2014

@arunoda

Description

@arunoda

Currently it's caching some old pages and it causes some errors.
Here's how to reproduce it: (Thanks to @rauchg)

  1. Create a page like this:
export default () => <p>
  hi there
  <a href="/about">About</a>
</p>

(Here we've a tag but not a tag)

  1. Then edit the hi there text into "hi Next.js". Browser will get updated via HMR.
  2. Now hit the "About" link in our page
  3. Hit back

Then you'll see the "hi there" text but not the updated "hi Next.js" text.
When you reload it the correct text appeared.

The Issue

The browser cache HTML and pages in the dev mode. Which should not be happened.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions