Description: Host your JavaScript and CSS Files in Google Drive for Free. View the Direct Link of your Scripts hosted on your Google Drive account.
In this guide, we will show you to host your JavaScript and CSS files into Google Drive for free. If you have a limited storage in your server or have a limited bandwidth, you can use your free Google drive account to take its unlimited bandwidth advantage. You will get 15 GB free storage to share across Google drive, Gmail and photos. Hosting external scripts or CSS files in Google drive are not difficult, just you have to find out the direct link of your files which is a tricky one as Google drive doesn't allow you to show the direct link. Once you get the direct link, you can easily add these external files into your blog's HTML source.
If you have a Blogger blog, you can either host your JavaScript or CSS files to Blogger itself or Google drive to take 100% up-time and unlimited bandwidth advantage. If you have your own server, limited or unlimited storage, you can host your JavaScript and CSS files into drive to reduce your server load. Many bloggers including me are using Google drive to host external scripts, and here is a simple method to do it.
More Blogger Tips:
More Blogger Tips:
- How to Add HTML Sitemap in Blogger
- How to Make Responsive Images in Blogger
- Auto Post to Social Media Sites When Publishing Post on Blogger
- Responsive Social Media Share Buttons for Blogger Posts
Host JavaScript and CSS Files into Google Drive & Get Direct Link
- Login to your Google Drive account.
- Click 'New' -> 'Folder', type your folder name i.e., script or css and click on 'Create'.
- Double click on the newly created folder. Again, click on 'New' and then 'File upload'.
- Now select your file from your local hard disk. It is upon you to select either JavaScript file or CSS file. The procedure will be remain same for both types of files.
- Once the file uploaded, right click on the file and choose 'share'.
- Under the 'Link sharing on' click 'More...' and select 'On - Public on the web', and click on 'Save'.
- Now copy the link as shown in the following preview. Paste it into your notepad.
- Make sure we will use only the highlighted part of the copied code as mention in the following preview.
- The direct link for the script file for this example will be,
https://googledrive.com/host/0BynUyePIYUATdkc5NXFkWmxLcjQ
- You can visit above link to view the script on the web.
Now, you have got the direct link. You can embed these external files into your blogs. In case, you don't know how to embed external JavaScript or CSS files into blogs. Here is simple a simple code.
For Hosting External JavaScript:
Go to your Blog's source code, find </body> and above this code paste the following code.
<script src='Direct-Link-of-Your-JavaScript' type='text/javascript'></script>
For Hosting External CSS:
Go to your Blog's source code, find <head> and below this code paste the following code.
<link rel="stylesheet" type="text/css" href="Direct-Link-of-CSS-File/>