Home > Programming, Servers & Scripts >

How do you use the CDN? (4)


05-02-2013 01:19 PM #1 karim0028 (Member)
How do you use the CDN?

Hey Guys,

I got a MaxCDN account to test stuff out and learn..... Stupid question, but how do you use the CDN? All the content ive googled shows you how to setup for wordpress...

Ie. when im creating a website, how do i refer to the static content....

currently for example i use "/file1.jpg" bc usually the pages are stupidly simple and only have 3-4 jpgs and usually are within the same folder or up one folder....

-H


05-02-2013 01:46 PM #2 vaalion (Member)

I have the same question and I'm trying to use beyond hosting to setup as my CDN. Seems so slow to upload pictures on it and then update all my landing page links to use those hosted images. So far it did not seem to speed up my page in ping tests too... Not sure if I'm doing it properly.


05-02-2013 11:15 PM #3 zeno (Administrator)

Guys, note that if you are using a US based VPS and sending US traffic to it you are unlikely to get much from a CDN at all. Given your VPS can handle the load, loading local files avoids the extra connect/wait/etc times with getting files from the CDN, so the CDN can actually perform slower. If you are sending traffic from overseas then the CDN is more useful for image files and static content.

For setting it up, what you generally do is upload image/static content to your CDN and put it in some sort of folder or bucket. Then, you can get the links for those files. Sometimes you need to change permissions on the uploaded files or make them public first before they will work. Then you take those image links and replace them on your lander - i.e. images/image1.jpg becomes something.cdn.com/123456789/xyz/image.jpg. Also, you can CNAME your CDN account URL so that for example "cdn.yourdomain.com" points to "something.cdn.com/123456789" which makes it simpler to remember and write out on your lander.


05-03-2013 02:30 PM #4 vaalion (Member)

Do you have a good way to test if the CDN is helping and by how much? I tried tools like http://tools.pingdom.com/fpt/ and pinged from amsterdam (to get an idea of the difference for people in Europe with my servers hosted in the USA) but I did not see any noticeable difference for the loading of both images on the LP I tested the CDN on. In fact, it was longer.

This test was done on http://tools.pingdom.com and when I try it on other sites to calculate speed such as loads.in where I can select specific towns like Paris as well it also shows them as slower...

Btw, does javascript files load faster if they are on a CDN? I'm not sure if they count as "static" files.


Home > Programming, Servers & Scripts >