Browser Status plugin

Plugin details

This helper provides a handy mechanism for retrieving important browser stats. Insert a line of code in the body of your layout template, and the user's browser will report back to you whether they have cookies and javascript enabled, and whether the session object is working properly.

Repositoryhttp://bornnaturalist.org/svn/plugins/browser_status/ Author Jason Hollinger Tags browser LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://bornnaturalist.org/svn/plugins/browser_status/

1) Insert this line at the top of your layout's body:

 < body>
   <%= report_browser_status %>
   ...


2) Enable this "before" filter in application_controller so that it runs before anything else for every request:

 class ApplicationController < ActionController::Base
   before_filter :browser_status
   ...


3) Now you have access to the following class variables from your controllers and views:

 @js                boolean: is javascript enabled?
 @ua                hash with keys :ie, :ns, :mac, :text, :robot, etc.
 @ua_version        float: e.g. 6.0 or 7.0 for :ie
 @cookies_enabled   boolean: are cookies enabled?
 @session_working   boolean: is session object working?


Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 5 months ago