Update Edge user agent detection for legacy version and modern version detection fix#45
Update Edge user agent detection for legacy version and modern version detection fix#45livenobin wants to merge 1 commit into
Conversation
Update Edge user agent detection for legacy version and modern version that detect Edge with keyword 'Edg'
|
I don't think this is quite correct, see: |
|
Two notes on this: Order matters here. The Edg pattern will also match a legacy Edge/18… UA (the .*? in the matcher lets Edg + e/18… match), so if Edg comes first, legacy Edge gets caught by it and never reaches the legacy entry. The legacy Edge key needs to come before Edg: 'Edge' => 'Edge Legacy (Spartan)', The label itself doesn't matter — it's display-only, the key is what's regex-matched against the UA. On my fork I labelled the legacy one 'Edge Legacy (Spartan)' to match CI4's naming and make it obvious it's the old EdgeHTML browser rather than a detection bug, while keeping the modern one as just 'Edge'. Feel free to name them however, but the ordering above is the important part. |
Update Edge user agent detection for legacy version and modern version that detect Edge with keyword 'Edg'