Category Archives: Browser Detection

Using CSS to Replace Content for JavaScript Disabled Browsers

Using CSS to Replace Content for JavaScript Disabled Browsers

If you’re like me, you love embellishing your projects with fancy JavaScript to give them pizzaz. But, chances are, you’ve also had some trouble finding a comfortable solution for replacing that JavaScript content for users who have (for one reason or another) disabled JS in their browser. After playing around with many possible fixes, I’ve come up with a standards-compliant, low bandwidth and easy to implement solution. And it’s probably something you weren’t expecting… CSS!

That’s right… by making use of the display:none CSS property we can serve alternate content to our non-JavaScript users without sending them to alternate pages on our site (a common, but outdated and clunky solution). So, get ready to turn off that JS in your browser (did I really just say that?) and start developing for true compatibility.

Continue reading »
Simple Server-Side Browser Detection with PHP

Simple Server-Side Browser Detection with PHP

Ever wish you could make a webpage behave according to the browser it is being viewed with? In many cases this can be done with some well-placed CSS code. But, how about those situations when CSS can’t help us out? CSS hacks and tricks won’t let you target Firefox, Chrome or mobile devices. So, do you just stay away from using custom content in those browsers?

Enter PHP browser detection! With just a little bit of code, your site can reach its maximum potential in every browser, and even in mobile devices.

Continue reading »

Subscribe via email