Category : Google Drive

Showing posts with label Google Drive. Show all posts
Showing posts with label Google Drive. Show all posts

Google Drive As A Content Delivery Network (CDN) For Your Website

After Google introduced Google Drive Site Publishing Feature, you can upload some static files like CSS, JavaScript, or Images to Google Drive and then use Google Drive as a kind of a free CDN (Content Delivery Network) for your website.

Rather than host your website's files on a single web server, you can distribute the website's static files and load across multiple server. This definitely will reduce the load of your server and greatly improve your page speed because the Google server has a lot more resources and respectable response times than typical shared hosting.

Actually when you follow this tutorial: How to Host JavaScript or CSS Files on Google Drive, the Google Drive already acts as a CDN for your website. But if you prefer shorter URL, something like http://cdn.domain.com/path/image.jpg or http://static.domain.com/path/style.css you can always create a sub-domain and redirect it to the "Public" folder on the Google Drive.
Note: This feature will not be available after August 31, 2016.

How to Host JavaScript or CSS Files on Google Drive

Many bloggers use a custom template for their blog and a custom template sometimes requires an external JavaScript file, but sadly we can't host the JavaScript or CSS file on Blogger because Blogger only allows us to upload images and videos.

Previously, most bloggers would use Google Code (http://code.google.com/hosting) to host these files because Google Code's project hosting feature is very simple to use and free. But since Google announced that they are deprecating almost all download options for Project hosting on Google Code, we have to switch to Google Drive as recommended by Google itself.

Starting today, existing projects that do not have any downloads and all new projects will not have the ability to create downloads. Existing projects with downloads will see no visible changes until January 14, 2014 and will no longer have the ability to create new downloads starting on January 15, 2014. All existing downloads in these projects will continue to be accessible for the foreseeable future.

If your project is using downloads to host and distribute files and has a need to periodically create new downloads, we recommend you move your downloads to an alternate service like Google Drive before January 15, 2014. Google

Actually it is not so hard to use Google Drive, just create a folder, upload the JavaScript file (or any other file like images, videos, documents including PDFs and Microsoft Office files) and then change the file's sharing settings from "private" to "public on the web", or simply change the folder's sharing settings from "private" to "public on the web" and all files inside that folder will have the same sharing permissions, but the tricky part is getting the proper direct link for the JavaScript or CSS files, so we can use it on the blogger template. Please follow the steps below to host your JavaScript or CSS file using Google Drive:
Note: This feature will not be available after August 31, 2016.

Method 1

With this method you can get the proper link with the file name:
https://googledrive.com/host/folder-id/filename

Example:
https://googledrive.com/host/0B47Pdqj--olfUENkNGhtX3lSN0U/example.js
https://googledrive.com/host/0B47Pdqj--olfUENkNGhtX3lSN0U/example.css

How To Create A Contact Form for Google Drive Hosted Website

Every website needs a contact page. Typically a contact page contains email, phone numbers and your address. A lot of people prefer to contact the website owner via email, they will click the email address link (mailto:admin@example.com) and it will automatically open an email client installed on their computer.

Webmail users will just copy and paste the email address from the contact page to their webmail. But what if for some reason they think that open and login to a webmail is a little bit troublesome, then we need to include a contact form because the contact form allowed visitor to give the website owner message right then and there.

A contact form is basically a set of questions filled out on the contact page by your visitor. The message automatically sent to the admin email when the visitor click the submit button. There are several ways to create a contact form for Google Drive hosted website:

How to Use a Custom Domain on Google Drive Hosted Website

I believe that you already knew that you can host your website with Google Drive. It's reliable, fast and the best thing about it is it's free. However with all these advantages, there's a negative side too, the URL of your Google Drive hosted website is too long and this will make the URL hard to remember.

Different from Blogger and Google Site, Google Drive has not included the custom domain feature. But thanks to http://gweb.io now you can use a short domain or even your own domain like www.example.com for your Google Drive hosted website. Actually there is another URL shortening service special for Google Drive http://gdriv.es/. It's much simpler, just follow the instructions on the homepage and you are good to go, but sadly you can't use your own domain.


Normal URL:
https://googledrive.com/host/0B47Pdqj--olfRTVSS3VnclRONkE/

gdriv.es:
http://gdriv.es/neldahealthyliving

gweb.io:
http://neldahealthyliving.gweb.io/
http://www.neldahealthyliving.com/

You can see that short URL or your own domain name is better and easier to remember than the normal URL. If you want to use custom domain on your Google Drive hosted website, please follow the steps below (Gweb.io recently made some changes, now it's simpler and more stable - Updated on September 18, 2013):

How to Use Google Drive as a Free Web Hosting Solution

So many people are looking for a reliable free web hosting and yes, there are several web hosting companies that provide free web hosting with tempting features like 99% uptime and unlimited bandwidth. It is really hard to choose the right web hosting company because their features are so similar and after some time most of them are either disappearing or suddenly selling commercial web hosting only.

Thanks to Google, on November 28, 2012, Eric Gilmore announced that Google Drive is getting support for site publishing. All you need to do is store your HTML, CSS, JavaScript and image files into a public folder and then set the folder's sharing settings to "Public on the web", so everyone can access it. I believe that using Google Drive as a free web hosting should be more reliable since your site will get served through Google's own data centers.
Note: This feature will not be available after August 31, 2016.

If you are not willing to pay for web hosting, but you want a reliable host for your site, the Google Drive site publishing feature is the answer. Here's step by step guide to use Google drive as a web host:


Step 1:
Login to your Google Drive account > Click Create > Select Folder

Google Drive - Create Folder

Step 2:
Name the folder > Click Create

Google Drive - New Folder