คุณเป็นนักออกแบบเว็บไซต์และออกแบบเว็บไซต์หรือวิดเจ็ต คุณต้องโฮสต์ไฟล์ของคุณบนเซิร์ฟเวอร์ CDN ที่รวดเร็วเพื่อให้ผู้ใช้โค้ดหรือเทมเพลตสามารถใช้โค้ดของคุณในเว็บไซต์หรือบล็อกนั้นได้อย่างราบรื่น ดังนั้นคุณต้องมีเซิร์ฟเวอร์ที่เร็วเป็นพิเศษสำหรับสิ่งนี้ จะแพง เหตุใดคุณจึงไม่ลองใช้บริการฟรีหลังจากการปรับแต่งบางอย่าง
Google นั้นรวดเร็วอย่างที่ไม่มีใครเทียบได้ นั่นคือคุณรู้ดีกว่าทำไมไม่ใช้เซิร์ฟเวอร์ของ Google เป็นเซิร์ฟเวอร์โฮสต์ของคุณเอง ใช่ คุณสามารถใช้งานได้ฟรี 100% หลังจากโฮสต์ไฟล์ของคุณที่นี่ คุณจะมีคุณสมบัติเพิ่มเติม เช่น โหลดเร็วมาก SEO ที่ดีที่สุด และเวลาในการโหลดที่ดี คุณสามารถโฮสต์ไฟล์ JavaScript และ CSS และ HTML ของคุณที่นี่ได้อย่างง่ายดาย คุณยังสามารถแชร์เพื่อให้คนอื่นใช้หรือฝังได้ด้วย
## วิธีโฮสต์ไฟล์ HTML, CSS, JavaScript
1.) สร้างไฟล์ของคุณ:
**ไฟล์ CSS เปิด Notepad และวางโค้ด CSS (หากอยู่ในไฟล์
tags, remove them). In the Notepad menu, select âÃÂÃÂFileâÃÂà> âÃÂÃÂSave asâÃÂàand type the file name with the
.css extension just like I did with mycssfile.css âÃÂàsee the screenshot below
In the same window, choose âÃÂÃÂAll filesâÃÂàin the âÃÂÃÂSave as typeâÃÂàoption and set the Character Encoding to UTF-8. If you want to host a JavaScript file, add the
.js extension (instead of .css) at the end of your file name (remove the
tags if you see them). Click âÃÂÃÂSaveâÃÂàand navigate to the location where you want to save the file
2.) Upload Your File On Google Drive:
Open httpsdrive.google.com and log in with your Gmail account. After you logged in, click on the âÃÂÃÂCreateâÃÂàbutton and add a new separate folder to upload your JavaScript and CSS files
Just after creating the folder, make it public so that whatever you will share in this folder will be accessible to the public. So âÃÂÃÂRight ClickâÃÂàon the folder and select âÃÂÃÂShareâÃÂÃÂ
Then click on âÃÂÃÂAdvance SharingâÃÂàto open more setting and make it like below
Open the newly created folder and âÃÂÃÂUploadâÃÂàyour HTML,CSS,JS files. After the files have been successfully uploaded, right click on the file names and select âÃÂÃÂGet LinkâÃÂÃÂ
3.) Get The Shareable Link:
When you will get the link that the link will be something like
httpsdrive.google.com/open?id=0B8dPWvOrtDiAS01WenpMSHcxMkk
Before you can use the links, you must replace
httpsdrive.google.com/open?id= to
httpsgoogledrive.com/host/ so it will become
httpsgoogledrive.com/host/0B8dPWvOrtDiAS01WenpMSHcxMkk
## Last Words:
As you can see, changing your file storage out so that is CSS and JavaScript is stored on your Google Drive account is easy to do and only takes a few minutes. After you make the change, you can begin benefiting from faster loading speeds, higher SEO rankings, and overall a more convenient platform to work from to increase the efficiency of your work.