Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
Why req.fresh always return false

I am trying to work with cache but every time I am getting false for req.fresh. On server side I am using Node.js.

Ref. link - https://expressjs.com/en/5x/api.html#req.fresh

Below is my Node.js code

const express = require("express");
const app = express()
const cookieParser = require('cookie-parser');
const PORT = 4040
const v1Api = express.Router()



v1Api.get('/:apple', (req, res) => {
    console.log("is req fresh %s", req.fresh);
    const parms = {
        myVar: req.params.apple,
        baseUrl: req.baseUrl,
        cookies: req.cookies
    };

    res.json(parms)
})

app.use(['/api/v1','/apiz/v1'], v1Api)
app.use(cookieParser);

-- I just want to test this with true result, so that can work further on this.

On the client end I am using Postman, below is the screenshot of the same. (please check header)

enter image description here

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!