1

I have a sample express.js app:

const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => {
  res.send(`<!DOCTYPE html>
<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>`)
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})

If I run this on localhost and open lighthouse tab in developer tools and measure performance I am getting FCP of 0.7 seconds for mobile (0.2 seconds for desktop).

Why is there such delay on localhost? Shouldn't it be almost instant?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.