I have a script tag and css tag like this:
<script type='text/javascript', src='version.js'></script>
<script src="js-new/main.js?version="+version></script>
<link rel="stylesheet" type="text/css" href="main.css?version="+version>
version.js
var version = 1;
return version;
I know I am doing it wrong but is there a way to do it just using javascript.
PS: I think I was not very clear. I just want to update version, not append the full script tag as it will already be there.