• SupportGeneral
  • Pagespeed test - serve static items with efficient cache policy

Hi,

I've noticed that when checking my page speed load there is a warning about the Buttonizer embed.js.

It says that the Cache TTL is 4hrs but is suggesting changing this to a longer time? It's only a small hit but just wondering if there is anything I can do?

Thanks

  • Jasper replied to this.
  • Hey georgergb ,

    That's a good question 🙂

    For almost all static files in our frontend, we're using the recommended Browser Cache TTL of 1 year. However, the embed.js file is the only file that has a shorter TTL of 4 hours.

    We're updating and deploying our code quite reguarly. If we would change the TTL for this file, it would take longer before changes and new features are shipped world wide (especially for visitors of sites that loaded the file earlier, Buttonizer frontend will only update once a year for example).

    To avoid that, and making sure all site visitors are up to date with the settings in the editor, we've chosen for this approach.

    However, I'll open an internal ticket to investigate if we can make the footprint of the embed.js smaller, so when it's rechecked, it doesn't take long since the other assets are still in cache 🙂

    Hey georgergb ,

    That's a good question 🙂

    For almost all static files in our frontend, we're using the recommended Browser Cache TTL of 1 year. However, the embed.js file is the only file that has a shorter TTL of 4 hours.

    We're updating and deploying our code quite reguarly. If we would change the TTL for this file, it would take longer before changes and new features are shipped world wide (especially for visitors of sites that loaded the file earlier, Buttonizer frontend will only update once a year for example).

    To avoid that, and making sure all site visitors are up to date with the settings in the editor, we've chosen for this approach.

    However, I'll open an internal ticket to investigate if we can make the footprint of the embed.js smaller, so when it's rechecked, it doesn't take long since the other assets are still in cache 🙂

    Hi Jasper,

    Many thanks for the response. That all makes sense to me about the TTL setting. Some of the PageSpeed warnings don't always seem to reflect the realities of how things need to work.

    Cheers

    George