In an effort to reduce my sites loading time i want to put java script code in external files to get them to load up quicker how do i put the code in a file and still get the code to load up in the same place on the page? also how do i rearrange the order thing on the page load? i know very little about coding and need to do this in html
You create a file first, name it something like: myfile.js Then copy your js code and paste it into myfile.js then save it. Next remove the js code from the page, and instead put this link between <head> </head> in your site's header: <script type="text/javascript" src="myfile.js"></script> Code (markup): That should work.
By the way you don't need to copy this in your old code: <script type="text/javascript"> </script> Copy only what is between those tags.
i have addthis, adsense and other java on my page i want to put the code into a file to make the page load faster but still have the visual elements of the code (adsense) for example load up in the original position on the page
if you paste these codes in external files that wont make your page faster. anyway if I'm not wrong you can do that by changing your html page file to .php format and use this command; <?php include 'yourexternalfile.txt'; ?> Code (markup):
i cant change the page to php or it will lose its inbound links say i have a file with 5 sets of javascript in it, how do i reference a specific script out of it onto the position on the page
That makes no sense whatsoever... changing what the PHP file is generated won't change it's location, so how would that effect inbound? Really I think you need to show us the page in question, though I get the feeling you don't know enough about HTML or PHP (or english) for any explanation we give you to make sense to you -- since to be frank none of your posts make any sense to us. I mean, qwikad put it about as plainly and simply as it gets -- there is no "simpler" explanation!