ajaxurl not defined for Android / iPhone browsers
|Reported by:||exz||Owned by:|
When trying to do an ajax call using the ajaxurl variable, it works perfectly in a desktop browser but not from my smartphone, HTC Desire HD using their standard browser. The problem has also been reproduced using an iPhone 4.
I've verified this as an issue using the Twenty Eleven theme and without any plugins, using WordPress 3.2.1 multisite installation.
Steps to reproduce:
- Go to jsconsole.com
- Type :listen
- Open site with your smartphone
- Try sending 'ajaxurl', 'console.log(ajaxurl)' or 'alert(ajaxurl)' from jsconsole
The result from this command sent to the phone browser is:
ajaxurl is not defined
I've ruled out issues with jsconsole.com by trying to send something else to the phone browser and looking at the response. For instance 'window', 'document.title' and 'window.localStorage' all returns the correct result from the phone browser.
Going to the same site with my Chrome browser, typing ajaxurl into the console gives: