Hosting Javascript/CSS file on CDN similar to Google hosting jQuery

走远了吗. 提交于 2019-12-03 07:12:26

问题


I am wondering if there are any hosts or if I can host my file (JS & CSS) on Google so that they are cached and load real quick (due to CDN and gzip).

A number of my customers use these files and I would prefer if they could somehow include this to file to receive the JS file. Ideally with filename.js?publickey=sdfgsdfg (which will be tied to a particular domain name).

The problem is that my hosting needs are very small- only about 100kb.

Any suggestions? My problem is that the customers using the JS & CSS file, have no clue about gzipping content or caching (as their shared hosts do not support it), as a result causes the JS/CSS to take forever to load. Am wondering if I can leverage an existing free service, or I do not mind paying either.


回答1:


Try SimpleCDN. You can store your files very cheap and the traffic is also not that expensive. Number of people have complained to their service - I have no objections.




回答2:


CDNJS.com allows you to submit a pull request to their GitHub account to get a JavaScript library on their CDN. I've been attempting to get a CSS library added on their forum old and abandoned forum.




回答3:


If you're comfortable with the Amazon cloud platform, you can use CloudFront. You don't need to use it with S3, but you can.




回答4:


You can try Amazon AWS CloudFront for quick content delivery. Amazon CloudFront works seamlessly with any origin server, which stores the original, definitive versions of your files.




回答5:


Here comes the JQGrid CDN Link

http://www.jsdelivr.com/#!jqgrid




回答6:


Use Cloudflare. It will take care of all your JS CSS files, with added security to your whole system.



来源:https://stackoverflow.com/questions/1470981/hosting-javascript-css-file-on-cdn-similar-to-google-hosting-jquery

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!