Hi folks, I'm creating a personal site and am attempting to do so without the use of any server-side scripting for various reasons. I have two directories - one for development, which is set up not to be readily available or visible to the general public, and another for the actual site. I do all my poking, prodding, and testing in the development directory, and upload the finished product on the "live" directory (I suspect this isn't uncommon methodology, but I felt the need to explain anyway). Up until now, I've used ASP for many of my scripting needs and seen no problems.
The problem I have now involves changing the href value of the base tag on my site's pages. I want to automate this process with JavaScript so that I can swiftly transfer changed files from my development directory to my live directory without having to swap the base href value back and forth to match the files' locations.
I know how to change the value of the href property of the base object... however, I believe the script is doing this *after* all the assets on the page have been loaded. This means the browser is attempting to load everything from the default base URL before the script has the chance to change it. As a result, the page renders without any assets (images are broken, all styling is gone, etc.). I'm not really sure what to do about this... can anyone give me a tip? Is there some way to reload a page's assets efficiently without reloading the whole page?
The problem I have now involves changing the href value of the base tag on my site's pages. I want to automate this process with JavaScript so that I can swiftly transfer changed files from my development directory to my live directory without having to swap the base href value back and forth to match the files' locations.
I know how to change the value of the href property of the base object... however, I believe the script is doing this *after* all the assets on the page have been loaded. This means the browser is attempting to load everything from the default base URL before the script has the chance to change it. As a result, the page renders without any assets (images are broken, all styling is gone, etc.). I'm not really sure what to do about this... can anyone give me a tip? Is there some way to reload a page's assets efficiently without reloading the whole page?