stejay
I'm new here

Browser Detection in FS

Hi

I am relatively new to First Spirit so please excuse me, I have searched for this and could not find much on the subject.

We are replatforming our sites in First Spirit and are needing to swap out content depending on the type of browser used, the current legacy system is just some simple JavaScript but with now it would simple be better to swap out section templates depending on the browser (example, flash viewer for Dhtml one), How would you have first sprit detect the browser used when viewing the page and then swap out templates on the result?

Thanks for the help

Stephen

4 Replies
martin_herschke
I'm new here

Hello Stephen

You have to understand that FirstSpirit creates "fix" html/jsp pages during the deployment process. At that point, FirstSpirit has no information about who, when or with which browser the user is requesting these pages later on. Even if you use the "dynamic" modules (f.e. personalization), the whole page content is created long before the user-request. (The mentioned module uses JSP methods to exclude some parts depending on authorization).

JavaScript is a client-side technology, so it would trigger after the user has recieved the page content.

If you want to skip page parts depending on request-header informations, you could use siimple JSP pages. If you need more specific informations about browser-plugins, etc. you should still use JavaScript.

Martin Herschke

feddersen
Community Manager

You might be interested in Browser language integration into FirstSpirit templates as well.

0 Kudos

Almost what I am looking for as if it could be possible, would basically have the page show certain section templates depending on the browser but as the answer earlier dont think its technicaly possible

0 Kudos

If you use a server side technology to detect the browser, you could use our Personsalisation module to display just the sections that are suitable for a mobile device or use a switch to use a different layout/css.

0 Kudos