3

When using Mobile Safari on my iPhone (4, iOS 5.0.1) to view this site, I am not able to log in using the top right drop down arrow that is seen on the mobile view. Nor am I able to enter the full site rather than use the mobile version. Both of these buttons "click" (in that they highlight as if pressed when I touch them) but nothing happens at all.

At the bottom of the page is a notice that reads "Apple requires external JavaScript from another domain, which is blocked or failed to load."

Javascript error when loading stackexchange sites directly in Mobile Safari

However, when I follow a link to this site within Twitter, using the in-app webview without loading it directly in Mobile Safari this error does not show, and I am able to log in and enter the full site without any issues.

Javascript works from Twitter, as shown through the use of the login button

I don't know when this started happening, but I am sure it used to work, and other users of matching kit report that it works for them. It's possible that this happens on other sites that use JavaScript, but this is the only one I have noted it on thus far.

To fix it, I have already tried the following: 1) Clear History 2) Clear Cookies and Data 3) Turned JavaScript on and off 4) Hard reset the phone 5) Removed all Website Data

7
  • Googling around this seems to be almost exclusively an error from SE itself, not the browser, and other similar questions have been asked on loads of other SE sites (su, ubunti, so, etc) for all sorts of browsers, not just Mobile Safari. The question remains, how do I clear it?
    – stuffe
    Feb 23, 2012 at 12:54
  • Do you access the site from a Safari bookmark or from a "link" in Springboard? (or god forbid typing in the addressbar). I'm on the same network as you, and same phone, with no issues.
    – Stu Wilson
    Feb 23, 2012 at 13:15
  • I just use the address bar, it autocompletes pretty quick. No bookmarks or anything else
    – stuffe
    Feb 23, 2012 at 13:36
  • can you go into Advanced in Safari settings, Show all Sites, then delete data for www.googleapis.com. then see what happens?
    – Stu Wilson
    Feb 23, 2012 at 13:59
  • another question. do you acecss the internet from any hotspots or enterprise Wifi networks? I'm thinking you may be being served a corrupt or out of date jQuery file from a proxy server whcih is being cached in your phone. UIWebView does NOT use the Safari cache so this may be why it works when inside Twitter.
    – Stu Wilson
    Feb 23, 2012 at 14:02

1 Answer 1

2

Turning on the Developer Toolbar showed lots of JavaScript errors, specifically:

undefined, typeerror, can't find variable $

This indicates that $, the "root" variable for jQuery was not set and therefore jQuery was not loaded.

Further, the error ajax.googleapis....ery/1.7.1/jquery.min.js - syntaxerror - parse error showed that the cached version of the jQuery library was corrupted and this is the reson why jQuery's $ was not loaded.

Force quitting Safari and clearing the cache again resolved the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .