I am workin gon the recommendation of Yslow and Google page speed to serve static content from cookie free domain.
I have created two sub-domain to serve images and JS and CSS files
static.images.mymaindomainname.com
static.mymaindomainname.com
i have even configured them to point to same domain(alias) and they seems to working fine.I am in a confusion about using these sub-domain to serve static content.
In my CSS file i am using images as images/my_image.jpg
and which resolve to www.mymaindomainname.com/images/my_image.jpg
and now i have to point this to sub-domain, do i need to change each and every image path with the sub-domain URL like
images/my_image.jpg-->static.images.mymaindomainname.com/images/my_image.jpg
same is the case with JS file and we have many CSS file.
Do i need to change path of each and every individual entry? Please suggest
i am using wordpress for portal development.
You can dynamically rewrite urls without touching your current css or js files using .htaccess and mod_rewrite. Check out this post:
site 5x faster via mod_rewrite, but CSS images are broken