1

I am new node guy and ran some tests one my website for speed efficiency. I got two really bad scores in these sections:

Scores

I looked into this and saw .htaccess solutions. From what I've read .htaccess is only supported on Apache servers. Node.js creates the server and therefore having an Apache install is useless.

I've seen some .htaccess alternatives for node but none seem to offer a fix to this issue. I also do not want to install npm modules that are too large.

What's the best solution?

1 Answers1

0

Since these resources come from an external domain (fonts.googlepais.com), there is nothing you can change in your node.js server for these.

For resources that are under your control, you can set http cache headers with req.header(). See https://stackoverflow.com/a/8007793/1194584

Community
  • 1
  • 1
Pieter Coucke
  • 428
  • 5
  • 13