resource reload when change subdomain

Here, I do a site with wildsubdomain, all subdomain use the same css and js stuff, but every time I change the subdomain, everything will reloaded, it’s not good for performance, so any suggestion or feedback will be appreciate!

I think that .htaccess rule might help you.

For example, redirect example ->

And so on…

Then the browser will not force client to get new version of file, and will use it from cache.