And for the moment we will discuss how to save javascript in Hosting Google, the following are some steps to save our script code in hosting google:
- Login to
your Google account, then visit http://code.google.com/hosting/
- Then click Create a new project as shown above, after the new window fill empty squares like the example shown below. Note: You need to consider is the fill Version control system and source code lisence, you have to fill in as the example image above. For other columns can be filled up to you. Then click Create project.
- You now have an account at Google Code, the next step is to save the javascript code that has been made over at Google Code. Heading into the tab 'Download' and click New download. Then click Browse and select the file you want to upload javascript. Fill in the information relating to the javascript file and then click Submit file.
- Javascript files you have uploaded to Google code. Now live call and puts them in your template. Click on the file that had been uploaded, after which it will open a new window. To get the direct link of the file you uploaded. Right-click on the file name and then select copy link location (Firefox) or copy link address (Chrome) as shown below.
- Now how to
put a direct link into the template? Consider the two images below:
Before being stored in the Google codeAfter stored in Google codeExamine the blue block on the second picture above, the top image, the image has not been summarized under the code has been summarized and stored in a storage area Google Code to be like this:<script src="http://obay-tutorial.googlecode.com/files/sample.js" type="text/javascript"/>
Javascript has been stored in the Google Code
Now what if a javascript file that is already stored in the Google Code belongs to another account? I will give the example below:
<script src='http://obay-tutorial.googlecode.com/files/sample.js' type='text/javascript'/>
Javascript URL above the red color that should be replaced with the URL of your script from Google Code. The trick copy the URL into your browser as shown below:
Then press Enter on the keyboard. If it appears safe choice, you simply save the file and then uploaded to Google Code you as step number 3 above. But if after press Enter javascript code that appears in rows so many, copy the code into notepad and save as in the picture at the top of this article. After it was uploaded to Google Code as the above steps. Then enter or change the URL of red in the above javascript URL or direct link from google code that you have uploaded.
That was one way to speed up loading of your blog by storing files on Google Code Javascript on your own, please understand and hopefully useful.
No comments:
Post a Comment