What does “client-side” mean?
The term “client-side” means “in the user’s browser”, as opposed to “server-side,” which happens on your server before anything gets sent to the user’s device. You can add a
The client-side option is great because you can make choices in the browser. For example, you could decide which video format or quality to display based on the user’s device type, browser, current bandwidth or even geo-location.
This option requires no change to your existing code, other than adding the
<script> block to any pages on which you want to use Device Detection.
And while on newer devices, this processing time isn’t really an issue, it could be a problem on older devices.
Additionally, download time and available bandwidth are both precious, especially in the mobile world where connection speed may vary. In order to take advantage of some the Device Detection parameter values, you will either need to send all of the various options to all devices, or make Ajax calls to fetch the correct option once Device Detection knows which device is being used.
None of the cons here are typically deal-breakers, but you need to know about them in order to make an educated decision.
Dealing with the various code options is something you need to be aware of and properly plan for.
Maybe you only need a short set of parameters, or you only need Device Detection to make simple decisions in the browser, or maybe you don’t want to (or can’t) make a lot of changes to your existing code base. In any of these cases, client-side Device Detection could be just right for you!