[How to] Compress and Host Javascripts for Blogger
Java script file plays a vital role in blog hosting as most of the gadgets are Javascripts (.js) files and even you could check with your own blog or website.
Here i explain how to host Javascripts for your blog with Google sites and how effective you could compress, thereby making the script load very faster and easier.
First Check out for the Javascript files in your blog or in gadgets where they might consume some bytes which makes your blog to load slower.To make them faster, It's very essential to compress them with Google closure compiler.
Follow these steps to host Javascript in GoogleSites
1. Go to Google sites website
2. Just login with your Google mail ID and create a Site of your own name or no probs if you've got already one.
3. You could see Create Page on the Right top and create a new one of your name.
4. After Creating a new page, it displays the page and you could see Attachments and Comments below the Page body.
5. Before attaching a file to it, make sure you compress the Javascript file and host to newly created page on Google Site.
6. Just Copy the Javascript file, and go Closure Compiler service, Just copy the code or if you've (.js) file hosted somewhere point out the location by browsing to (.js) file URL.
7. As showed on the screenshot, press compile button and your code is compressed, Just copy the code on right column and save it as a text file.
8. Now Back to Google sites, Attach the compressed and saved text file on Attachments section.
9. Just Right click the Download link and save the txt link as shown here.[some thing like this http://sites.google.com/site/sitename/pagename/filename.txt]
10. Just copy the above text file and replace the Javascript file and it works!!!!
So need to worry since it's hosted on your own Google sites page.
Add a Reply / Comment
(Don't forget to Activate the email subscription from your Inbox)