Wordpress website broken in Facebook mobile browser - javascript

i'm facing a weird issue, my website doesn't appear well (without CSS & javascript) only in the Facebook mobile browser.
In Desktop everything is OK, in Mobile with Chrome or other browsers is OK.
But when i open my website link or post link inside facebook in-app browser it appears with no CSS & Javascript.
Screenshot of issue >> https://i.ibb.co/R3R3FLd/222977963-228682545788525-3749803821851752230-n.jpg
notice : I don't have a caching plugin.
i'am using Sucuri CDN, and disabled their cache.
thanks for your help

I had a look again, here is the result:
If multiple users are seeing the same issue, I'm thinking that it's related to your CDN handling, serving an outdated/corrupted version.
You might want to refer to Troubleshoot Cache Issues.

Related

Javascript Not Working on Android Default Browser

I am working on a web site that is served via a Mikrotik Router.
It's a site to provision internet for users up to 100m away.
When you connect to our Wifi, a sign in page is supposed to pop up where you enter your credentials to authenticate and use our internet.
For some weird reasons whenever the user tries to sign in, for android users the Android OS keeps on presenting their default browser to sign in on the Network. Unfortunately, it appears that the Javascript is not running on the native default Browser that popped.
I am not using any ES6+ features so I'm currently lost at what could be wrong.
When I previewed the Site on Google Chrome/Opera Mini and Phoenix Browser, the javascript is working very well.
I added this tag before the closing tag of my head element:
<noscript>
<div>
We're sorry but our site <strong>requires</strong> JavaScript to work.We recommend you use Google Chrome.
</div>
</noscript>
to be displayed if Javascript is disabled, but it is not even displaying.
I tried inspecting with Google Chrome devices inspection but it seems Google Chrome devices inspection only works with Google Chrome Mobile Browser(I might be wrong).
Any insight to fix this would be really appreciated.
Thank you.
I think you need to set setDomStorageEnabled(true)
for the webview settings.
You can read more about webview here:
http://tutorials.jenkov.com/android/android-web-apps-using-android-webview.html

facebook javascript sdk login not working on iOS / best practices for mobile

I'm trying to allow a user to login to my webapp via facebook login using the javascript SDK. It works on desktop (safari and chrome), however the pop up fails on both safari and chrome on iOS.
The error is straight forward to chrome where the browser and OS are not supported. This issue has a work around described here. It is less clear what the issue is with safari and not seeing the pop up. The login call is called on a button click so I don't believe the browser should block it. I also tried allowing pop ups as suggested here but that solution did not work nor is it a viable long term solution to force users to change that setting.
How do folks use facebook login in production and expect it to work on mobile? Do you need to use the manual fb login? It appears that the javascript SDK doesn't work well with mobile browsers and OS's.
This is common issue among mobile browsers and you will find that it would also be in some android devices.
For precaution it is under best practice to build flow of login manually.
Go here as your link.
So yes, you will need to go with manual integration. But, it will be full-proof integration without doubts.

Iphone App - how to reproduce inapp browser actions ?

I have a problem with an IOS app that is being developed.
We agreed (with an outside development company) to develop a hybrid application : both webview and native code. My website : http://youmind.it is perfectly responsive and the functionnalities of my website work fine (imagine a feed of photos that you can like, comment and share). You can like, comment, report, share a photo from any browser on a mobile phone.
On the first tests on the app however, the functionalities on the webviews really dont work. Either something happens visually but is not registered in database, or nothing happens. The dev company tells me this is because of my website which doesnt work on the browser inapp. Problem is : they dont give me ways to test my website on such a browser, therefore no way to tests changes.
We checked that javascript was correctly enabled on the Iphone APP, and now I am totally powerless... Do you know If I can reproduce (say on a computer, or even on an Iphone), the behavior of my responsive website, in order to make tests and validate that there is a problem on the website side (and not on the appside) ?
Thanks for your help !
Martin
Note : website works with python / django. Not sure it can help.

Javascript and Jquery - IE blocking it running (Galleria)

I have linked to the Jquery library at google in my header, and my local copy of the Galleria Javascript file - as the instructions on the Galleria website said to do.
The code functions perfectly in Chrome. However, when attempting to view the site in IE9 I am faced with "Internet Explorer restricted this webpage from running scripts or ActiveX controls." This is preventing (without user input) the Javascript/Jquery/Galleria stuff to function; it is also prevented an embedded Youtube video from displaying.
What am I missing - plenty of other websites use these functions and I don't get IE giving this message. What do I need to add or change?
I am viewing the website from my PC - it is stored locally at the moment.
Cheers!
This is happening because you are running your website locally. You can be sure that this will not happen once you upload it to a webserver.
You can also run a local webserver. I can recommend WAMP:
http://www.wampserver.com/en/

How do I check in Firefox and Chrome if a plugin is installed

I'm using an embedded plugin in my web app to enable scanning (Dynamsoft's webscanning plugin). I'm serving an xpi to firefox users and a crx to chrome users. When viewing the page without the plugin installed, Firefox will try to download the plugin and the user will need to click "manual install" to install it. Chrome will make no attempt to donwload the plugin (this is by design, according to http://code.google.com/p/chromium/issues/detail?id=15745)
I would like to use javascript to detect wether the plugin is installed or not (preferrably before trying to load it through the embed tag). If no plugin is installed, I want to provide an explanation and a link to the correct plugin to the user. Both browsers install their respective plugins without any problem if the user clicks at a download link instead of just trying to load through the embed tag.
So, does anybody know a way detect wether a plugin is installed using javascript?
Have you had a look at window.navigator.plugins?
..and the equivalent reference for webkit plugins-
The Apple reference for the WebKit DOM appears to have disappeared. navigator.plugins does work for me in Safari & Chrome. See a jsfiddle here: http://jsfiddle.net/2EaKD/
Sounds to me like a potential security hole, if a website (something remotely) could access your plug-ins (something locally). So I guess this is not possible.
Your addon can monitor which pages are opened by the user. If it is your page, you can make your addon set a global variable in that page and your page's JavaScript should be able to detect this.

Categories

Resources