SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    adding expires header for images via CDN

    Hi,
    We have finally decided to move to a CDN since it would help serve our static content better. Since I'm an avid Yslow! user I've always added Far future expires header to all the static content that were being served by our server. Now that the CDN is going to serve all the images, javascript and css files, how do I ensure that the static content has a far futures expires header to them? Your help is much appreciated.

  2. #2
    SitePoint Enthusiast TomK32's Avatar
    Join Date
    Mar 2008
    Location
    Berchtesgaden, Germany
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's a task for your webserver as in the best case requests to static content won't hit the rails stack.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I don't have a clear idea yet as to how the CDN works, please correct me if i'm wrong. So basically the flow is like this.
    .html (or php) files refrences to static.mysite.com/images/abc.gif -> which goes to the CDN (since static.mysite.com is mapped to CDN) -> images comes to end user from cdn.
    I have doubts about the 3rd stage. If the static images go directly from CDN to the end user, then any addition of headers should be done at the CDN side right? Or is it that the images come from CDN to our servers and from the they are deliverd to end users, in which case I can easily take care of adding the headers?
    Thanks for your patience.

  4. #4
    SitePoint Enthusiast TomK32's Avatar
    Join Date
    Mar 2008
    Location
    Berchtesgaden, Germany
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah it should be done in the CDN, ask your CDN admin.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •