jstats, we control a similar setting and, according to your comment, it makes sense.
Repeat what I think you decided to do in this case -
- Most likely, you compress and merge your files, creating a dynamic & random file name that is sent to the CDN.
- [long guessing snapshot here ..] - you somehow notice on the server (maybe a file like a PID file, but contains a randomized file name), which you can capture during rendering to point to the CDN file.
- When rendering, you check with your code on the server side whether you work in production or in development. 3a. If you are manufacturing, take your "PID" file and point to the CDN 3b mini file. If development, download all regular resources
This requires a leap of assumption, but I saw this implementation before, so I went with it: -p
Answer your question regarding a more ordered version:
Yes, one great way to simplify this is through something like the Google Pagespeed Module
Then just configure the virtual hosts for your production installation, to let Pagespeed do its work and set up development, turn off the Pagespeed feature!
In the end, it is relatively simple.
I am sure that you have moved, but in case someone finds this question and is looking for an answer.
source share