I have a static script declaration as a requirement, is it possible to have its URL dynamically constructed once browser wants to download it?
<script async src='https://my-known-host.com/script.js?param1=<dynamicValue>'
</script>
This parameter is generated on the client and let's say I want it to be just a random number.
- I want to generate random on client side because server caches pages and this request should have a unique random number every time paged is loaded (even from cache)
- I need to have it statically declared in order to start the download right away (even before browser parsed to the line of declaration)
Is it possible?
<script type='text/javascript' src='yourURL.php?getParam=getValue'></script>and have your PHP page return JavaScript.