External JavaScript with session_id
Posted: Mon May 28, 2018 9:43 pm
Hi All,
I want to load an external JavaScript file and make sure it's not cached. When I update the external file, nuBuilder still loads the old file even when the user logs off and in again.
I thought I can work around that by adding the session_id to the javascript.
I've included an External JavaScript in the header :
but there's an error
I want to load an external JavaScript file and make sure it's not cached. When I update the external file, nuBuilder still loads the old file even when the user logs off and in again.
I thought I can work around that by adding the session_id to the javascript.
I've included an External JavaScript in the header :
Code: Select all
document.write('\x3Cscript type="text/javascript" src="https://apis.google.com/js/client.js?id=' + nuCurrentProperties().session_id + '">\x3C/script>');
session_id is not defined when the header loads. Is there a better place to place it?Uncaught TypeError: Cannot read property 'session_id' of undefined