How many times has this scenario happened to you?
- Makes local changes to your style sheet(s).
- Upload the changes to the staging server.
- Switch to your browser and hit “reload”.
- Nothing happens.
- Force-reload. Nothing happens.
- Go back to make sure the upload is finished and successful.
- Reload again. Still nothing.
- Try adding !important. Upload, reload, nothing.
- Fight to control your “zen” whilst sitting at your computer.
- Check Firebug to see what’s overriding your new styles. Discover they aren’t being applied at all.
- Continue in that vein for several minutes before realizing you were hitting reload while looking at the live production server, not the staging server.
- Go to the staging server and see all your changes.
- Start cursing at your own idiocy.
Like many other well known developers out there (Eric Meyer back in the day! 😉 ), this has happened to me too, so when I saw the frustrations of a fellow developer I had to re-voice this.
There is are several ways of ensuring that your code is seen on the staging server but not on live – but the most effective way?
Load the right bookmark/type the correct URL in your address bar is a good starting point!