mahiro mahiro mahiro
mahiro mahiro mahiro
Explore posts from servers
CDCloudflare Developers
Created by mahiro mahiro mahiro on 1/20/2024 in #general-help
Caching on single page application
As far as i understand. in multi page application we will handle different route on backend so different route will be cache on cloudflare and i set the ttl (this is what i do before with mpa) But now with single page appication. on different route. without the instruction from the backend. will the browser automatically know to use the static html + js from the cloudflare cache? Here is my backend code:
app.get('*', (req, res) => {
const filePath = path.resolve(
__dirname,
'..',
'client',
'build',
'index.html'
);
res.sendFile(filePath);
});
app.get('*', (req, res) => {
const filePath = path.resolve(
__dirname,
'..',
'client',
'build',
'index.html'
);
res.sendFile(filePath);
});
5 replies
CDCloudflare Developers
Created by mahiro mahiro mahiro on 1/18/2024 in #general-help
Just a general question about cloudflare?
No description
13 replies