In the middle between cleanest and easiest way, I would :
- In the CSS, point to images with URLs containing a distinct marker ; like "
image.png?VERSION_NUMBER
" (literaly)
- this will allow the CSS file to be used while developping
- To avoid any problem with cache, I would configure Apache (on the development machine) to indicate files should not be cached by the browser
- I would use some kind of "build process", that would replace this
VERSION_NUMBER
marker by the real version number in every CSS file (and possibly, JS, PHP, HTML, ... )
- This would create modified files, containing the right version number
- Those files would be the ones deployed to the webserver
- Ideally, the
VERSION_NUMBER
could be the SVN revision of each file ; this way, only files really modified would have to be modified ; but also harder : for each file (each URL in the CSS file !), you have to determine it's revision number before replacing the marker !
If some browser don't cache images/js/css because of the query string, the marker could be included in the files' names.
And now that you have a "build process", you can also use it to make some other manipulations, like minifying JS and CSS files, for instance
As a side note : yes, creating and testing the build process / script takes some time ; it might be easier to server CSS files through PHP, using a variable in those to indicate the version number... But, for performances, serving CSS files (at least one per PHP page ; probably more !) wouldn't be that wise ; so, probably better to take a bit more time to write the build process...