Quick tutorial: Host JavaScript/Css files on Google Code

 on Jumat, 02 Mei 2014  








You must have a google account to use this trick


Well this is a really simple trick , just follow these simple steps to do it :


  1. Go to the following link and hit the link at the bottom of the page  "Create a new project" :

  2. Fill the form like in the picture :

  3. Now in the next window, click on Source tab and Browse tab. Now you can store your CSS and JavaScript files directly from here. But I recommend you to select a sub directory and upload the files to be hosted on Google servers.
  4. Click on trunk sub directory under svn directory and then click on create button. (I am going to create a new CSS file. So you can upload your files by using the upload option. Here I will explain how to create a new CSS file on Google code.)

    [Image: 3.png]
  5. Now copy and paste your CSS or JavaScript codes into the box as shown below image. Type the name for your file, including its extension. (If your file is about JavaScript, then end the name with .js. If it’s a CSS file, add .css extension at the end of the path.)

    [Image: Untitled.png]
  6. After editing the commit log, click on the Commit button.

    You’re done. Now you uploaded your file on Google code successfully. The last parts of these steps are finding the link of hosted files and attach the file to your web pages. First, you have to get the URL of your hosted file.
  7.  On the next screen, you can see your uploaded file. In my case, it’s my CSS file. So it will look like below image. In file info section, you will see a link “View raw file”. Click on that link and copy its address.

    [Image: Untitled.png]

    That’s it. It is the URL of your hosted file. Now let’s see how to attach those files to Blogger and other web pages.

    Attach Hosted CSS & JavaScript files to web pages :


    You can link your hosted CSS file or JavaScript file easily to your Blogger blog or every web page. Just need to do is add a piece of HTML code to your template.

    To link a CSS file to your website, copy and paste below link and replace Your CSS File Address with the CSS file address you just copied earlier.

    Code:<link href='Your CSS File Address' rel='stylesheet'/>

    To attach an external JavaScript source file to a web page, add below code and change the URL with your Js file URL.


Quote:<script src='Your JavaScript File Address' type='text/javascript'/>


All you need to do is copy and paste the code just above of </head> or </body> of every page you want to implement.

Google code allows you to upload up to 4096MB which is similar to 4GB. That is amazing and absolutely unlimited file storage. You will never exceed that limit. I guess.

Hosting CSS and JavaScript files on a reliable server is very crucial. Google code is one of those sites who provide free space to host your files online. Every web designer and web developer make use of Google code to store their valuable coding assets.It's very useful because by changing one code file,they can change the appearance of gadgets,themes that are used by thousands of customers.
If uou have found any problem leave a comment !


Quick tutorial: Host JavaScript/Css files on Google Code 4.5 5 Unknown Jumat, 02 Mei 2014 You must have a google account to use this trick Well this is a really simple trick , just follow these simple steps to do it : Go to th...


Tidak ada komentar:

Posting Komentar

Diberdayakan oleh Blogger.