OpenLayers OpenLayers

Ticket #755 (closed feature: fixed)

Opened 1 year ago

Last modified 1 year ago

Better Browser Detection

Reported by: euzuro Assigned to:
Priority: major Milestone: 2.5 Release
Component: general Version: 2.4
Keywords: Cc:
State:

Description

For ages now we've been using OpenLayers.Util.alphaHack() to detect if we are in IE or not. With the advent of IE7, this is obviously no longer a viable solution.

Attachments

browserdetection.patch (1.2 kB) - added by euzuro on 06/12/07 12:54:29.
using the navigator.userAgent string, we make a generic function to return the name of the browser in a 2-letter code (as explained in the comment)
browserdetection.2.patch (3.1 kB) - added by euzuro on 06/12/07 13:15:35.
even better -- modified example.html to display the browser name in the header or "detection error" if it didnt work
browserdetection.3.patch (3.1 kB) - added by euzuro on 06/12/07 13:20:11.
instead of returning null on no detection, now return "" (empty string)
browserDetection.4.patch (3.2 kB) - added by crschmidt on 06/12/07 13:29:46.
change strings

Change History

06/12/07 12:54:29 changed by euzuro

  • attachment browserdetection.patch added.

using the navigator.userAgent string, we make a generic function to return the name of the browser in a 2-letter code (as explained in the comment)

06/12/07 13:15:35 changed by euzuro

  • attachment browserdetection.2.patch added.

even better -- modified example.html to display the browser name in the header or "detection error" if it didnt work

06/12/07 13:20:11 changed by euzuro

  • attachment browserdetection.3.patch added.

instead of returning null on no detection, now return "" (empty string)

06/12/07 13:29:46 changed by crschmidt

  • attachment browserDetection.4.patch added.

change strings

06/12/07 13:39:42 changed by sderle

patch #4 seems best. go ahead and apply.

06/12/07 13:43:12 changed by crschmidt

  • status changed from new to closed.
  • resolution set to fixed.

06/12/07 14:26:08 changed by tschaub

doc string could use updating (no longer 2 character code)

06/12/07 15:44:22 changed by euzuro

doc string has been updated with r3325