How To Host JavaScript And CSS Scripts On Google Drive

Google Drive Wallpaper

Embedding an external CSS or JavaScript file instead of writing the entire code has its advantages. However, Blogger doesn't provide the flexibility to host CSS or JavaScript files in one separate link. They are hosted within the blog's code through HTML tags. Hence, today I will teach you how to host scripts on Google Drive and then link them back to your website/blog so they work properly.

Note: You must have a Gmail account in order to get access to Google Drive.

Steps to implement:

1. Make sure you are signed-in to your Gmail account and visit drive.google.com.

2. Click on the upload icon beside the CREATE button >> Click on Files... >> choose the CSS or JavaScript file which you want to host.

Google Drive Files

3. After the file is uploaded, click on that file >> Click Share on the bottom right of the page.

Google Drive Share

4. Sharing settings will open up. Copy the link given under Link to share >> Click on Change...

Google Drive Sharing Settings

In the Visibility options, select Public on the web >> Hit Save. You now have your file's sharing link (the link that you just copied). Also, that file is now public on the web (this is necessary).

Google Drive Public

6. The last step is a bit tricky. I will teach you how to prepare a proper hosting link for your CSS/JavaScript file, so that you can embed it in your website/blog's HTML code.

Ref: http://www.techsperia.com/2013/07/how-to-host-javascript-and-css-scripts.html

Comments

Popular posts from this blog

UTF-8 Miscellaneous Symbols

[HOW TO] Root Samsung GALAXY S4 (I9500)