Mar 03 2023 06:41 AM
Here is the scenario:
<meta http-equiv="refresh" content="300">
<script>
setInterval(function() {
window.location.reload();
}, 300000);
</script>
How can I force the latest version of the images to appear without the need to force a hard refresh each time that we navigate to the page? Is there a way to switch off caching on that page?
Any help would be greatly appreciated!
Mar 03 2023 11:28 AM
Solution
Append a unique query string parameter to the image URL: You can append a unique query string parameter to the image URL each time it's updated, which will force the browser to reload the image. For example, you can add "?v=1" to the end of the image URL, and then increment the value of "v" each time the image is updated. This can be done in Power Automate by using the "Compose" action to append the query string parameter to the file URL.
Change the file name of the image: If appending a query string parameter doesn't work, you can try changing the file name of the image each time it's updated. For example, you can add a timestamp or date to the file name to ensure that it's unique. This will force the browser to load the new version of the image.
Use a content delivery network (CDN): You can use a CDN, such as Azure CDN or Amazon CloudFront, to serve the image file. CDNs cache content on servers located closer to the end user, which can improve performance and reduce the likelihood of browser caching issues.
Disable caching for the image file: You can configure your SharePoint site to disable caching for the image file. To do this, go to the site settings, select "Site collection features", and then activate the "Output Cache" feature. This will disable caching for the entire site. Alternatively, you can use the "Cache-Control" HTTP header to control caching for individual files.
Mar 22 2023 06:17 AM
Firstly, thank you for the quick response! It's very much appreciated. I'm replying with my update on this, as I've continued to work on trying to implement one of your suggestions:
Either way, I think the CDN route will be the solution to the issue once I get an update from MS on the issue. I'll update when I have a compete solution.
Thanks again!
Jul 31 2023 06:06 AM
"Off-page" refers to actions and strategies employed outside of your website to increase its exposure and ranks in search engine results in the context of SEO (Search Engine Optimisation). Off-page SEO concentrates on elements that, while not directly under your website's control, might affect its popularity, authority, and reputation online. These elements aid search engines in determining how relevant and reliable your website is, which may have an effect on how high it appears in search results.
Mar 03 2023 11:28 AM
Solution
Append a unique query string parameter to the image URL: You can append a unique query string parameter to the image URL each time it's updated, which will force the browser to reload the image. For example, you can add "?v=1" to the end of the image URL, and then increment the value of "v" each time the image is updated. This can be done in Power Automate by using the "Compose" action to append the query string parameter to the file URL.
Change the file name of the image: If appending a query string parameter doesn't work, you can try changing the file name of the image each time it's updated. For example, you can add a timestamp or date to the file name to ensure that it's unique. This will force the browser to load the new version of the image.
Use a content delivery network (CDN): You can use a CDN, such as Azure CDN or Amazon CloudFront, to serve the image file. CDNs cache content on servers located closer to the end user, which can improve performance and reduce the likelihood of browser caching issues.
Disable caching for the image file: You can configure your SharePoint site to disable caching for the image file. To do this, go to the site settings, select "Site collection features", and then activate the "Output Cache" feature. This will disable caching for the entire site. Alternatively, you can use the "Cache-Control" HTTP header to control caching for individual files.