TurnWheel / jReject

jQuery Browser Rejection Plugin
http://jreject.turnwheel.com/
277 stars 98 forks source link

iOS7 Homescreen - Safari true, iphone true is ignored - see reject popup #34

Open brittneykernan opened 11 years ago

brittneykernan commented 11 years ago

Add your web site to Home Screen and see reject message pop up with safari and iphone set to false (do not reject these).

User Agent may have changed on Home Screen Web Apps. Using http://www.whatismybrowser.com/ on Home Screen the browser is Unknown.

still see the reject popup with these settings:

reject: { iphone: false, ipad: false, unknown: false, // Everything else - iOS 7 homescreen comes up unknowns safari1: true, safari2: true, safari3: true, // Apple Safari < 4 chrome14: true, chrome15: true, chrome16: true, chrome17: true, chrome18: true, chrome19: true, chrome20: true, chrome21: true, chrome22: true, chrome23: true, chrome24: true, chrome25: true, chrome26: true, // Google Chrome < 27 firefox14: true, firefox15: true, firefox16: true, firefox17: true, firefox18: true, firefox19: true, firefox20: true, firefox21: true, firefox22: true, firefox23: true, // Mozilla Firefox < 24 msie6: true, msie7: true, msie8: true, // Microsoft Internet Explorer < 9 //chrome:true, //testing opera: true, // Opera
konqueror: true, // Konqueror (Linux)
linux: true, solaris: true, },

We may need to wait until iOS7 update before addressing this issue

BluSyn commented 11 years ago

I was able to reproduce the user agent change when loading from iOS7 homescreen.

Normal iOS 7 Safari User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A501 Safari/9537.53

Homescreen iOS 7 Safari User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11A501

The difference is subtle, but it removes Version/7.0 and Safari/9537.53. Everything else is still there, but it would be exceedingly difficult to determine iOS 7 without the Version/7.0 indentifier. This means there isn't an easy fix, other than having Apple fix this in the next version. However, I have a feeling this is intentional on Apple's part for some reason or another.

However, jReject does properly identify it as iPhone, so I don't see the rejection popup even using your settings (due to iphone: false). Though it can't identify the browser type or version (safari 7), so a safari7 setting would fail in this case.

The following values show for homescreen iOS7: $.browser.className = unknownX $.browser.name = unknown $.browser.version = X $.browser.versionX = X $.os.name = iphone

Make sure you are using the latest version when testing this.

I guess this isn't perfectly helpful, but I will dig deeper into Apple support and let you know how that goes.

brittneykernan commented 11 years ago

This is very helpful and thanks for the quick response.

Another issue I had on iOS 7 was properly refreshing and clearing the browser cache to test. Now that a couple days have past and my cache has been cleared etc many times, looks like iphone:true does the trick

Thanks again

Sent from my iPhone

On Oct 9, 2013, at 1:30 PM, Steven Bower notifications@github.com wrote:

I was able to reproduce the user agent change when loading from iOS7 homescreen.

Normal iOS 7 Safari User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A501 Safari/9537.53

Homescreen iOS 7 Safari User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_2 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/11A501

The difference is subtle, but it removes Version/7.0 and Safari/9537.53. Everything else is still there, but it would be exceedingly difficult to determine iOS 7 without the Version/7.0 indentifier. This means there isn't an easy fix, other than having Apple fix this in the next version. However, I have a feeling this is intentional on Apple's part for some reason or another.

However, jReject does properly identify it as iPhone, so I don't see the rejection popup even using your settings (due to iphone: false). Though it can't identify the browser type or version (safari 7), so a safari7 setting would fail in this case.

The following values show for homescreen iOS7: $.browser.className = unknownX $.browser.name = unknown $.browser.version = X $.browser.versionX = X $.os.name = iphone

Make sure you are using the latest version when testing this.

I guess this isn't perfectly helpful, but I will dig deeper into Apple support and let you know how that goes.

— Reply to this email directly or view it on GitHub.

BluSyn commented 10 years ago

I had reported this user-agent issue to Apple around the time this bug was submitted. I still have not received any response. The bug remains open on Apple's bug tracking system.

Apple bug #15236208

Keeping this open until I hear back.