Zen Cart Logo
Forums / General Questions / Can I use Max CDN?

Can I use Max CDN?

Views: 1,357

Results 1 to 3 of 3
1 Aug 2012, 7:15 PM
#1
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Can I use Max CDN?

Ive seen a similar thread on this but it was back in 2010 and nobody had an answer for it. So maybe something changed?

Ive already tried using cloudflare which has reduced my first page load time to about 3 seconds which is OK. Im trying to get it down even more and ive signed up to Max CDN (one year is free!)

http://support.netdna.com/knowledgebase/custom/

The way it works it automatically caches images the first time its loaded and then serves these from the nearest location server they have to the user.

Also does the same with stylesheets and scripts

Im trying to get my load down to under 2 seconds for SEO purposes.

Here is how it works with images

Replace: <img src=”ORIGIN_URL/images/logos/big.jpg” /> or <img src=”/images/logos/big.jpg” /> With: <img src=”ZONE_URL/images/logos/big.jpg” />

Pretty simple really.

Stylesheet

Replace: <link rel="stylesheet" href="ORIGIN_URL/css/styles.css" type="text/css" /> or

<link rel="stylesheet" href="/css/styles.css" type="text/css" /> With: <link rel="stylesheet" href="ZONE_URL/css/styles.css" type="text/css" />

Script

Replace: <script type='text/javascript' src='ORIGIN_URL/public/js/jquery-1.3.2.min.js'></script> or

<script type='text/javascript' src='/public/js/jquery-1.3.2.min.js'></script>

With: <script type='text/javascript' src='ZONE_URL/public/js/jquery-1.3.2.min.js'></script>

So its all cached autmomatically first time its requested.

Is there a way in Zen cart to put my ZONE_URL prefix in instead? Maybe theres a simple file somewhere to hack to get it to work?

Thanks

2 Aug 2012, 1:35 AM
#2
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: Can I use Max CDN?

Not sure why you would have to modify all of your links manually to specify a zone_url?

Not familiar with that provider, but Cloudflare uses an apache module to rewrite them on the fly.

Your CDN provider should use GEOIP to send the request to the nearest (to the user) cache/server.

3 Aug 2012, 6:01 AM
#3
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Can I use Max CDN?

HI
Im using cloudflare too but that works differently

I want to have my header image and another image on my index page running from max cdn as its faster. For the main image i can just paste in the alternative link as its in the editable area but not the header