Tags:
create new tag
, view all tags

Question

What would be the easiest way to render parts of a page based on the User-Agent header of the client browser?

In particular, we are looking for a way to present links to shared drives in two different ways, depending on whether the user agent contains (in basic) windows or linux.

ConditionalPlugin does part of the job, but it seems there is no way to switch on this header information as is.

(You can watch your browser headers at many internet sites, i.e. here: http://www.ericgiguere.com/tools/http-header-viewer.html )

Any ideas?

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Platform, Browser Issue, Plugins

-- SteffenPoulsen - 24 Aug 2005

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

DakarRelease supports %HTTP and %HTTPS that recover the headers. You could easily hack up a temporary plugin to get these variables until Dakar is released.

-- CrawfordCurrie - 02 Sep 2005

See also related HowUseConditionalComments.

-- PeterThoeny - 01 Oct 2005

 
Topic revision: r3 - 2005-10-01 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.