workwise
workwise

Reputation: 1103

Wordpress: JQuery undefined leading to infinite refresh on IPhone

I have a wordpress website working fine in most browsers (including some mobile ones). http://tinyurl.com/njjrxld

Now, on IPhone, the homepage just refreshes in an infinite loop. I emulated IPhone in Chrome developer tools, and even there, it is behaving the same. I checked the console logs (turned on "Preserver log upon navigation").

It gives bunch of errors: jQuery is undefined on each page refresh and sometimes other undefined errors also.

I am unable to debug further as the window actually just refreshes infinitely. I want to know how to debug, why is jQuery undefined error coming in iPhone emulation only, and why is the page refreshing.

Upvotes: 0

Views: 75

Answers (1)

el producer
el producer

Reputation: 321

I would fix all JS errors first to get down to the root cause. First error being:

Uncaught ReferenceError: _gaq is not defined

To further answer your question on "How to debug", I would set a break point whereever you get an error and see why its breaking. The error messages should be your biggest clues.

Another clue as to why it only happens sometimes or some users, could be a clue that it is a timing issue. Often with jQuery templates you may have used jQuery/$ before the script was included. On slower connections this might be more apparent.

Upvotes: 1

Related Questions