Can I generate cached content on HS (page, global content)
Hi @dennisedson and @RMarinov. You could maybe run the AJAX as a serverless function, set it to run once a month, and then use the HubDB API to update (or cache, in other words) a HubDB with the AJAX data. Then use the HubDB on your page. It would be very roundabout 😛
The iframe isn't relevant. Caching is determined by the HTTP response headers sent by the site being iframed.
Every time a visitor requests a page, their browser makes a complex string of requests. These requests hit various servers which make complex calculations and routes to serve visitors their files.
HubSpot automatically caches pages and files on both the server and browser level to ensure the quickest delivery of all page assets to your website visitors. When your page or any dependency of your page (such as a template or module) changes, we automatically expire the server caches for that page.
Server caching is especially effective for mobile website visitors and visitors outside the US where network latency is higher.
However, if you are talking about having a module that persist throughtout many pages, then a global module is what you are looking for.
2) Iframes, again requesting/comming from our thurd-party site.
Lets assume super-cool-page is heavily visited one. Yes HS probably will cache some static content, but the AJAX requests will still be issued every time the page loaded. Our third-party side will not benefit from the HS caching in this way. Thanksfully the content requested from our third-party side doesnt change very often (we update it roughly once per month). We hope that we could prepare cached snippets(probably global content modules in HS - you name it) for these iframes only when the data gets changed. And then when user visits the super-cool-page the iframe would not issue request, but render cached content.