Current time: 05-31-2020, 11:17 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to run ENTIRE site (not just images, etc) via CDN?
09-14-2011, 12:56 AM
Post: #17
RE: Is it possible to run ENTIRE site (not just images, etc) via CDN?
Not that I'm aware of. Looks like Google Image Search uses a similar technique. Regardless of how you go about it, there is going to have to be some trade-offs for cacheability (when you combine multiple files together then it's that specific combination that you are caching). For category pages this shouldn't be a problem but there's probably a long tail of images for search.

Hand-waving the caching issue for now, the flow would basically look like this:

- detect that the browser can support data URI's (on the server probably)
- instead of src tags on the images, put an id on the img tag (or a div where the image will be placed inside of)
- below all of the images on the dom, include javascript that walks all of the tags and makes requests to the back-end image/json service for the images in groups (say 6-10 per request)
- when the json response for each comes back, dynamically insert the src tag on the image elements with the data URI for the image

For images that you don't expect to be cached you can actually inject the data URI directly into the response (either inline in the img tag or in javascript at the end of the page).
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Is it possible to run ENTIRE site (not just images, etc) via CDN? - pmeenan - 09-14-2011 12:56 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)