When integrating a PHP file from a wpengine site into a bigcommerce (formally interspire) platform, the inclusion process appears as:
%%Include.http://www.server.com/testing.php?store_id=4649b4c235fba82029176fa8a802c3%%
To learn more about this process, click here:
While everything functions properly, an issue arises with the clock within the included file updating every 20 minutes instead of every minute due to wpengine's own cdn delivery. Attempts to reset the cache by modifying the URL are successful, such as changing it to include different variables like
%%Include.http://www.server.com/testing.php?store_id=4649b4c235fba82029176fa8a802c3&variable=123456789%%
and %%Include.http://www.server.com/testing.php?store_id=4649b4c235fba82029176fa8a802c3&variable=987654321%%
.
However, when trying to introduce dynamic variables through JavaScript like:
<script>
variable = Math.floor(Math.random() * 1000) + 1;
document.write("%%Include.http://www.server.com/testing.php?store_id=4649b4c235fba82029176fa8a802c3&variable=" + variable + "%%");
</script>
The intended functionality fails, leaving uncertainty in diagnosing the issue. Although the correct file and store_id are present, the dynamic variable fails to affect any changes.
Are there any alternative methods for introducing a dynamic variable or preventing the cdn from caching the page?