Search code examples
google-drive-apiscript-tag

Link Javascript file hosted on google drive


Researching how to accomplish this and my .js file is not working.

Here it is embedded:

<script type="text/javascript" src="https://googledrive.com/host/id_goes_here/"></script>

I have already made the folder and the file public to everyone. Why is my html not recognizing this linked file?


Solution

  • According to the most reputable documentation I can find (and wasting about an hour trying this myself unsuccessfully), Google Drive no longer supports hosting web files. That's why your <script> tag source will not work. This is stated in the following links:

    Google no longer allows hosting files from Google Drive. It is no longer possible to serve javascript or css files from Google Drive. This feature was shutdown on 1st September 2016...

    https://productforums.google.com/forum/#!msg/blogger/HjOU0jIidQY/_k6FtwnVDwAJ https://gsuiteupdates.googleblog.com/2015/08/deprecating-web-hosting-support-in.html