Using wildcard domains to serve images without http blocking

Posted by iopener on Server Fault See other posts from Server Fault or by iopener
Published on 2010-06-05T20:19:30Z Indexed on 2010/06/05 20:23 UTC
Read the original article Hit count: 248

Filed under:
|
|
|
|

I read that browsers sometimes block waiting for multiple images from the same host, and I'm trying to do everything I can to speed up page load times.

One caveat: I need to serve files over HTTPS.

Any opinions about whether this is feasible:

  1. Setup a wildcard cert for *.domain.com.
  2. Whenever I need an image, generate an number based on a hash mod 5 of the filename, and append it to an 'img' subdomain (eg img1.domain.com, img4.domain.com, img3.domain.com, etc.); the hash will make any filename always use the same subdomain, and therefore the browser should be able to cache the images
  3. Configure a dynamic virtualhost record to point all img#. subdomains to /var/www/img

I am looking for feedback about this plan. My concerns are:

  1. Will I get warnings when my page has https:// links to multiple subdomains?
  2. Is the dynamic virtualhost record I'm talking about even possible?
  3. Considering the amount of processing this would require, is it likely to even produce any kind of overall benefit? I'm probably averaging a half-dozen images per page, with only half being changed on each page refresh.

Thanks in advance for you feedback.

© Server Fault or respective owner

Related posts about dns

Related posts about Performance