[TYPO3-dev] Serving static content from a different domain

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Mon Apr 4 22:31:00 CEST 2011


Hello folks!

For performance reasons we would like to
serve static content like images, stylesheets,
fonts, scripts, etc. for our client's projects
from a different domain.

We thought about this setup; example for client 'A':

	Main Website: www.client-a.com
	Locked area: private.client-a.com

	Resource domain 1: client-a-1.static-content.com
	Resource domain 2: client-a-2.static-content.com

The resource domains would just point to the same
host directory on the same server, so the path to the
static files would be the same - we would only exchange
the domain for the static contents.

Now two questions come into our minds:

* Does it _really_ make sense to use a completely
different domain to serve static content, or would
also a subdomain like static-1.client-a.com do the job?
(The "only" advantage of a separate domain is a "better"
chance of having a cookieless domain?!)

* How would we ensure that _ONLY_ static content is
being served from the domain? We want to ensure that
only static files can be requested via the resource domains,
the website itself should not be accessible by them. Can this
be realized by using .htaccess restrictions or similar?

Are there any concerns using this approach? Is there a better
way of serving static content (except using real CDN)?

Thanks a lot for your appreciated feedback!

Regards,
Thomas




More information about the TYPO3-dev mailing list