Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 791891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:54:30+00:00 2026-05-14T21:54:30+00:00

I’m hoping to investigate/implement a CDN (initially just via a sub-domain, though moving over

  • 0

I’m hoping to investigate/implement a CDN (initially just via a sub-domain, though moving over to CDN in time) and am having a mare finding resources that talk about handling of versions of files on that sub-domain.

Most places I’ve worked previously have implemented caching of resources (images, javascript, css, etc.) and when wanting to change an image, have gone through the painful process of just changing the filename of the image, and changing the reference to it in the source code (so that customers see the new, not the cached image).

What I want to achieve

what I’d like is:
resources.domain.com

with sub-folders such as:

  • scripts/
  • images/
  • css/
  • etc.

not a problem, and will help with the yslow/page speed scores (assuming cookieless domain etc.)

But versioning of assets is something I want to resolve.

E.g.

resources.domain.com/images/promo_banner1.jpg

I’d probably have to cache and expire perhaps every 10-15 days.

Assuming we have something key come in as a business request, and we need to change it, I want to be able to override that. From what I understand, I could append a querystring (?1.1) to it to force browsers to see it as a different resource.

I know I can do this in MVC (or indeed ASP.NET) by creating a ‘CompanyResource’ html helper that will lookup against perhaps a resource file or something similar to see if we have a new version, and if so, append the version number as a querystring element, but there has to be a better way?

So, what has the community come up with?

  • how best to deal with resources in a sub domain (assume I’ve read all of the yslow/google backup docs around this)
  • what have folks come up with to handle versioning of assets (to minimise overall code changes when something updates) – code based helper methods to deliver assets based upon some rules?

Hopefully I haven’t waffled too much.

Thanks for any and all help 🙂

Cheers,
Terry

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:54:31+00:00Added an answer on May 14, 2026 at 9:54 pm

    just noticed this one hadn’t been answered – we resovled our problem with Html helpers under ASP.NET MVC using the following.

    In web.config we stored the ‘resources_url’ (in this case resources.mycompany.co.uk), and called the following:

    <%= Html.MyCompanyResourceScript("~/scripts/jquery-1.4.2.min.js") %>
    

    Which translated to an Html helper:

    public static string MycompanyResourceScript(this HtmlHelper helper, string url)
    {
        string _out = String.Format(@"<script type=""text/javascript"" src=""{0}""></script>", url.ToMyCompanyUrlAction(helper.ViewContext.HttpContext));
        return _out;
    }
    public static string ToMyCompanyUrlAction(this string url, HttpContextBase context)
    {
    return String.Format("{0}://{1}{2}", 
        (context.Request.IsSecureConnection ? "https" : "http"),
        WebConfigurationManager.AppSettings["resources_url"],
        VirtualPathUtility.ToAbsolute(url, "/"));
    }
    

    We created helpers for MyCompanyResourceImage and MyCompanyResourceCss with suitable parameters for alt tags/media types etc. also.

    This means we can (from the outset) host via our own resources domain, and if in future we choose to move that over to a CDN, then we can do so with minimal fuss.

    Hope that helps someone.

    Cheers,
    Terry

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hoping this is just a case of syntax. I'm writing a custom search function
Hoping someone might help me figure out the weird issue I'm having with jQuery.
Hoping that I do this corectly. I am having the above issue. My development
Hoping someone can help me with this problem I'm having w/ IE. So the
Hoping I am just missing something simple here: $sql = Select * FROM user_info,
Hoping there is a way to do this. Would like to just display the
Hoping for a quick answer here. OK, since I do a lot of single
Hoping someone can help. I am working on an aspx site, using the c#
Hoping that someone can help clear up this very annoying situation I find myself
Hoping someone with a better knowledge of javascript can assist, I am wanting to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.