In order to prevent a website from caching your css/js/whatever you can add a variable to the call and update it when you release new code.
Here’s an example of a quick way to update all of the calls via command line in any particular directory:
find ./ -type f -exec sed -i -e 's/master.min.css?v=1.1.1/master.min.css?v=1.1.2/g' {} \;
Below is code I put into my .htaccess to set an environment variable to change the content/theme for mobile users.
# Mobile
SetEnvIf User-Agent "Mobile" IS_MOBILE
SetEnvIf User-Agent "Googlebot-Mobile" IS_MOBILE
SetEnvIf User-Agent "BlackBerry" IS_MOBILE
SetEnvIf User-Agent "iPod" IS_MOBILE
SetEnvIf User-Agent "iPhone" IS_MOBILE
SetEnvIf User-Agent "NetFront" IS_MOBILE
SetEnvIf User-Agent "Symbian OS" IS_MOBILE
SetEnvIf User-Agent "Windows Phone" IS_MOBILE
Notice that ‘Android’ is not present in the User-Agent check. While testing with a Galaxy Nexus and Nexus 7, I noticed that the easiest way to tell the difference between Android on phones vs. Android on tablets was to check for ‘Mobile’.
From here I can access IS_MOBILE via PHP like so:
if (isset($_SERVER['IS_MOBILE'])) {
include('index-mobile.php');exit;
}
'Word document' and 'website' don't really go together…