1

I am fairly new to using CDN but i've found that there are two types of CDN.

You redirect your DNS to your CDN and they automatically take over the traffic as a proxy and do the caching and content delivery. No change in URLs and it's basically no work. Even hard to understand if my content is being delivered through CDN (you have to check headers or use website tools that look for it). Good example is CloudFlare You do not redirect your DNS. You give it an origin server, then everything gets copied over to the CDN servers and you content is available on the new CDN URLs. Now, i have a website with a lot of images. I want to use Microsoft Azure CDN. I created my profile (Standart Microsoft CDN) and created the CDN endpoint. I tested and it works fine https://xxxx.com/images/example.png

https://xxxx.azureedge.net/images/example.png All good - my image is there, along wiht others

So what comes next? I have an image (img src tag) for example pointing to /images/example.png. It seems like i need to change it to https://xxxx.azureedge.net/images/example.png

So my Joomla website has a lot of images and if i have to go and manually re-do all the img src tags it seems like a lot of work and what happens if i decide to move to another CDN or stop using CDN. So all this leads me to believe i might be missing a point here and not doing this correctly.

Is that the correct way a CDN like this should work? If yes, may i get some help on how can i achieve that with minimum amount of labour? re-doing all my css, js and images to the new URLs? I am using Joomla CSM.

Documentation out there on how to tackle or deal with something as easy as this are unbelievably limited.

  • 1
    If you do have to change your img tag you could use something like re-replacer to make the updates on the fly. – Irata Aug 16 at 23:36
  • I got a suggestion from the Joomla forum on using an extension called "CDN for Joomla". I installed and it's exactly what i needed. Without no interaction it makes the css/js and images load from the CDN domain without even chaning the img src URLs. However, the Free version does not do it with HTTPS which ruins the whole idea. Anyway, i think i see that what i suspected is correct (that this is the way to do it and it's a bit hard) and re-replacer might do the job but it's actually very counter-intuitive to do it this way. Thanks for the help – Djongov Aug 17 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.