nextjs ssg response analysis
Unanswered
Red wasp posted this in #help-forum
Red waspOP
I have a web server that runs next.js 12.0 I know that SSG and Build manifest are for generating static html pages to display the users over the cloud. My site mostly has static pages, same for all users so it is no surprise that it is using SSG; Yet I have some questions,
I was checking the requests to my server something came up to be interesting:
I have
What is this SSG_MANIFEST or BUILD_MANIFEST exactly do to my browser if I get them as a response ? What do they do in the cloud and what do they mean ? What does it mean If I get empty {} json object instead of that ? Because I realized Sometimes I get an empty {} like this.. very rarely.. I suppose that has to do with some cloud caching this? What is the set inside
Some headers are looking like this:
I was checking the requests to my server something came up to be interesting:
I have
_buildManifest.js, _ssgManifest.js... which sent request to returns a response body like this:_ssgManifest.js :self.__SSG_MANIFEST=new Set(["\u002F404","\u002F500","\u002F[[...slug]]","\u002F_oembed","\u002F_preview","\u002Fdraft-preview\u002F[id]","\u002Fsearch"]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()What is this SSG_MANIFEST or BUILD_MANIFEST exactly do to my browser if I get them as a response ? What do they do in the cloud and what do they mean ? What does it mean If I get empty {} json object instead of that ? Because I realized Sometimes I get an empty {} like this.. very rarely.. I suppose that has to do with some cloud caching this? What is the set inside
new Set()Some headers are looking like this:
Cache-Control: public,max-age=31536000,immutable
Content-Disposition: inline; filename="_ssgManifest.js"