Page Renders in Safari but not in Chrome on iPad - ios

Versions:
PC OS: Windows 8
iPad OS: iOS 7.0.2 (11A5901)
Chrome: 30.0.1599.16
ExtJS 3.4.0
Problem:
I have a web application that relies heavily on Javascript (using the ExtJS framework). It all seems to work as I expect except one page. When browsing this page on my iPad using Safari, the page renders correctly. When in Chrome, I only get the part of the page that doesn't need javascript. However, if I click on the chrome menu and request desktop site then the page loads as intended.
Things I have tried / searched for:
How to debug this page in Chrome on the iPad. All the articles are either old or say to use Safari (because Chrome and Safari use the same engine?), but the page works in Safari.
Setting the agent string in my desktop version of Chrome. The page still loaded correctly.
I turned off Javascript in Safari (just to see). Safari then behaved like Chrome.
I'm just looking for a direction to go or something to try. I'm pretty new when it comes to iPad development. But I think that if I could just see what the developer tools show, I can work it out from there. I can't post a link because the site is behind a login.
Any help is appreciated!

One approach might be to load Firebug Lite on your page. This would allow you to log errors and print JavaScript values to the console.

Related

Google Chrome mobile browser rendered the website only in download version after updated iOS to 16.1

Chrome mobile browser for iOS and after updated iOS to 16.1 version rendered one of my website as a download. Anyone had the same problem? Earlier I've never seen that for the years. That problem is occasional but some of traffic is lost.
The url looks like this (on the left side see the download icon):
The rest part of the website is rendered only as a text and photo.
Others mobile browsers checked and I didn't see that problem. The same for Android but in this case my website is the right rendered for all browsers.
Could you tell me where I should look for the reason of that problem?

AngularJS data-binding not working on iOS Safari Only for Heroku App

In my current MEAN stack project, everything functions fine on desktop Safari, Chrome, and mobile Chrome, but in mobile Safari for iOS, data-binding shows as text (e.g. {{data.total}} as opposed to $25). To make matters worse, when I open the app from iOS Safari served from localhost, it also works properly.
I've tried rolling back my Heroku app and the problem persists, even when I go back to a version from when I'm sure it looked good on an iPhone. I've checked it out on others' iPhones, and gotten the same negative result. I can't find this problem elsewhere on the internet, nor am I sure what I should be looking for as the problem seems to be with Heroku or iOS.
Here's the live page: http://minneapolish3-beta.herokuapp.com/reddress. This has me very much stumped, but I'm pretty green. If you find it not working on other platforms, I'd love to know about that as well.
(Naturally, I can't well spin up a CodePen example as the problem is only occurring in the wild.)
A friend introduced me to the Safari Web Inspector for mobile which allwed me to see warnings, alerts, etc.
It turns out that my Google Maps API call, via http://, was causing the page to break on mobile Safari. When I changed it to https:// everything worked! Thanks go to Bonus Kun whose answer to another question helped expedite my solution.

in an android app how to open an external link in firefox (or user-chosen browser)

I'm using Phonegap + JQuerymobile to develop an Android app.
I wish to open an external link on an external browser (say Firefox, or Chrome; or let the user choose the browser).
How can I achieve this?
I have tried, without achieving desired results:
mylink.com
I also use '_blank', but I don't really see the difference.
Thanks.
UPDATE:
I've done some research, but have not found yet an answwer. I've also checked this questions, but they don't seem to solve my problem:
Links don't open in external browser in JQuery Mobile with PhoneGap: attributes _blank and _system don't seem to make a difference in my app
Open External Page in Popup in jQuery Mobile: this is using an HTML popup
Force iOS app opens external links in safari: this is for iOs apps
Opening links in external device browser with Cordova/jQuery-mobile: again the _system parameter, which doesn't show the list of browser for the user to choose from (not it's my default Chrome browser either)
other google searches
This did the job: using navigator.app.loadUrl()
full example:
(taken from: Opening an url in a new browser window in Android working with PhoneGap)

IOS Web App open links within web app

I am in the mist of creating a mobile web app and have both meta tags
I have an iphone 5 on 7.0.4
When I click on a regular link like the one below it, opens up a mobile safari window and leaves the webapp. I also tried setting the target to _self and same behavior.
Sign in
I then used my ipad which was on 7.0.3 and it worked as should, not opening mobile safari on links. I think proceeded to update my ipad to 7.0.4 and the same issue as I had on my ipad.
Anyone ran into this issue and or knows a fix ?
Thanks
Since iOS 7.0.4 all links in WebApps open in Safari. As a workaround you can use Javascript:
window.location.href='text.html'
But remember that these steps will not be captured in history (so there is no ability to use Javascript like history.back() ..).
Alternatively, if you are using a menu in your web app, try to combine iframe and Javascript, you can change the content of your iframe with this Javascipt:
document.getElementById("frame").src = new_content.html
This will prevent your WebApp to open up links in Safari and stay in WebApp view.

iOS6 - removed console log for IPad - how to use web inspector on windows?

So iOS6 is out, horrah. Now, it appears as though Apple have removed the 'Developer Console' that used to exist in Safari. Great, I hear a lot of people say - it was limited.
But, it works on the device - now apparently you have to connect the device to a Mac to get web inspector?
Is this the only way of debugging with console? Is there a way of debugging with windows, safari? Please note, I don't mean just changing user-agent, which you can do on Safari Windows - that doesn't register touch events - just click.
If you don't have Mac OSX you can use this script as console replacement:
https://github.com/robotnic/waterbug
It shows error message, it's possible to log all kind of variables, you have to turn your iPhone or iPad 90° to the right to open the console.
A poor mans debugging console:
try {
var test = document.do.something();
}
catch (exc) {
alert(exc);
}
One can debug on the device by using bookmarklets (especially within Mobile Safari).
Debugging on the device can be very important if an error only appears live on the device but nowhere else. There is a variety of bookmarklets for developer, so choose the tool of your choice (e.g. Firebug Lite), add it to your bookmarks and use it right where you need it.
This may not be the Developer Console, but it is a method to debug much more accurate and job-oriented.
I wrote a blogpost on how to use bookmarklets on my weblog (there is also a list of other common testing tools and further bookmarklets):
http://hofmannsven.com/2013/laboratory/ios-bookmarklets/
UPDATE: Chrome released its Mobile DevTools which will make debugging (within Google Chome Mobile, Android Devices only) much easier. This will not fix the missing DevTools issue within Safari, but it might help to locate errors on a device:
https://developer.chrome.com/devtools/docs/remote-debugging
http://www.html5rocks.com/en/tutorials/developertools/mobile/
UPDATE2: Mozilla released a Firefox add-on to enable web development across browsers and devices: http://youtu.be/kEFbQwB81RE?t=1m58s
Have a look for weinre. It allows you to inspect a page running in Safari from another computer using a Chrome-like web inspector
You can use window.onerror to debug errors without a console. Simply add this code to your HTML document in its own <script> tag before any other Javascript code:
<script type="text/javascript">
window.onerror = function(e){
alert(e);
};
</script>
This will do so that whenever there is an error, the error message will be shown in an alert dialog box, which is visible in iOS Safari. It's important that the above code runs before the error you're trying to debug, and if you're debugging a syntax error, it's also important that it's in a separate <script> tag.
Instead of Safari on Windows you could use an app by Telerik called AppBuilder. I've found the instructions on this blog. You'll need to get an account to use the Telerik Platform though.
This will give you dev tools like the ones in Safari. I've used it on Win7 64 bit with regular web apps and Phonegap apps running on an iPad with iOS 7.1.
Like neno suggested, Telerik AppBuilder is a great applications. I am actually running Windows XP in a virtual machine on Linux only for the purpose of debugging my iPhone. Windows XP because in my case Windows 7 does regognize the iPhone, but iTunes and Telerik AppBuilder don't.
Looks like the built in console is gone. I tried plugging into a Windows 7 and opened Safari and could not locate the developer console. Then I read this article which confirmed it.
If you need to be able to test your site in both orientations then waterbug is not a good option, because it uses up the landscape orientation for its console view.
One decent option is to use Adobe Edge Inspect. You open your site on Chrome and open the app on your device and your device will mirror whatever page you have open on your desktop. Then you can use the Chrome dev tools to debug your content.

Resources