We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the file express-configuration/index.js the maxAge is logged as one day but in reality is set to one year.
console.log("Setting 'Public' folder with maxAge: 1 Day."); var publicFolder = path.dirname(module.parent.filename) + "/public"; var oneYear = 31557600000; app.use(express.static(publicFolder, { maxAge: oneYear }));
Since setting public cache to one year is the maximum recommended, I suggest changing the log to the following:
console.log("Setting 'Public' folder with maxAge: 1 Year."); var publicFolder = path.dirname(module.parent.filename) + "/public"; var oneYear = 31557600000; app.use(express.static(publicFolder, { maxAge: oneYear }));
The other option is to use 86400000 milliseconds such as the following:
console.log("Setting 'Public' folder with maxAge: 1 Day."); var publicFolder = path.dirname(module.parent.filename) + "/public"; var oneDay = 86400000; app.use(express.static(publicFolder, { maxAge: oneDay }));
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the file express-configuration/index.js the maxAge is logged as one day but in reality is set to one year.
Since setting public cache to one year is the maximum recommended, I suggest changing the log to the following:
The other option is to use 86400000 milliseconds such as the following:
Thanks!
The text was updated successfully, but these errors were encountered: