How to Save Javascript in Hosting Google

In a previous article I have discussed about secret accelerate the loading on the blog by using script code. If you use a template by using a lot of scripts that are stored in the Google Code by the creator of the template, certainly not just you who use these templates, there must be other users using the same template. If the blog by using the same template loading at the same time is sure to be more severe, if only two or three is not too pronounced but the templates that use a lot of what not heavier loading? In addition, to guard if at any time the script the template creator damaged or overload.

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:

  1. Login to your Google account, then visit http://code.google.com/hosting/
  2. 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.
  3. 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.
  4. 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.
  5. Now how to put a direct link into the template? Consider the two images below:

    Before being stored in the Google code
     After stored in Google code
    Examine 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"/>
    The script code above is a summary of the code sample script code length of the top and the red color is a direct link file that we upload on Google Code at step number 4 above.

    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

Enter your email address:

Delivered by FeedBurner

Copyright © Obay Tutorial. All rights reserved. Template by DinDun Corp.Ltd