I want to send messages from a popup window created by window.open('domainB.com') to a parent window at domainA.com in IE11. I read on the internet that this is basically not possible in IE11, but I think the google sign in button does exactly this. Any idea how they do this?
All I want is from javascript on domainA.com, popup a window to domainB.com in IE11 and then have domainB.com send messages to domainA.com using postMessage, localstorage, cookies, anything.
https://github.com/krakenjs/post-robot
this library does exactly what I was describing
Related
I'm using this approach: https://stackoverflow.com/a/25796908/3437433
It works like a charm, but when I'm trying to use it in Safari (both desktop and mobile), then quite strange things happen.
On desktop, origin link https://wa.me/?text=123 is somehow replaced with whatsapp://send?text=123. And then Safari displays error page about wrong protocol.
On mobile, correct page is opened by origin link, but also alert appears saying "can't open page because url is wrong". I can close that alert, can click on "send" button, but then https://whatsapp.com/download/ page is opened, instead of prompting to login to whatsapp and redirecting to chat.
Does anybody know what's going on here and whether it can be fixed?
We usually differ link at desktop view and mobile view to offer support for safari and other browser.
for desktop view we use
https://web.whatsapp.com/send?phone=6200000000&text=Hello%20Moxqitto
for mobile, we follow whatsapp best practice https://faq.whatsapp.com/en/android/26000030/
https://wa.me/6200000000
Tested on
Chrome for mac
safari for mac
android chrome
Ps: not tested when mac have whatsapp desktop app, but it will still work in the safari itself. so it should be ok
Official Sharing Documentation For WhatsApp. They say to use their wa.me/... URL. Okay! So let's try it out! http://wa.me/?text=mytest For me, I get an error message...
PAGE NOT FOUND
However, these seem to work great for me!
https://api.whatsapp.com/send?text=YourShareTextHere
https://api.whatsapp.com/send?text=YourShareTextHere&phone=123
If you are interested in watching a project that keeps track of these URLs, then check us out!: https://github.com/bradvin/social-share-urls#whatsapp
I have a QTWebkit simple browser that works until it opens a pop-up windows inside a security page (with login/password) and the new window redirects me to input the credentials again.
I can't find a way/examples/books/forums that deals with this problem.
Could anyone point me to a direction, or provide a simple example on how to keep the logged user to access the pop-up/new window resources in the web page ?
Thanks in advance
Is it possible to see what rest calls a page makes when I visit it? Like if I go to google drive, can I see what calls my browser is making to their web servers? If so how? Would something like Wireshark be used in this case? Is there something higher level than that?
In Chrome Ctrl + Shift + I then click network. You can view all network traffic or filter it. AJAX requests generally show up under XHR (XmlHttpRequest) unless the website is using JSONP - in that case they would appear under Scripts.
Here is a demonstration to get API URL from the ProtonMail pricing page:
Head over to the ProtonMail pricing page.
Open Chrome DevTools Ctrl + Shift + I then go inside the Network tab.
Switch to Fetch/XHR then click left panel list item.
You'll see Request URL on Headers tab.
Most modern browsers have some sort of developer console you can use. For example, in Chrome you can open the console with Ctrl-Shift-J, and then select the Network tab. After that, all network requests will be logged so that you can inspect them.
I have a mvc4 web app that sits behind ADFS 2.0 authentication, it's configured using the web.config file. The application can be visited by going directly to a URL or as an iframe inside of CRM 2013.
The application works in all (tested) browsers when visiting the URL directly, both redirection to login form and handing the user back to the web app with the proper information in the ClaimsIdentity.
However, when visiting the app as an iframe inside CRM2013, internet explorer goes into a continous login loop. You are asked to provide the credentials (which are the same as for logging in to CRM) and when you click ok you get redirected back to the same login page again, to my knowledge the app never receives the hand off.
In Safari, Chrome, Firefox, and Opera the users are able to log into the application inside of CRM as well as outside without any problems (I'd even go as far as saying that it works better than expected for these browsers).
Does anyone have any idea of what I can try or what the problem could be for IE?
EDIT 1
I'm thinking it has to do with some security setting and am playing around with the settings in IE. Unchecking this box stops the login form from showing in IE at all and I get an empty page instead.
Is the iFrame on the same (sub)domain as the site inside? You can use Fiddler to view your redirect flow, are the cookies added as expected?
I've seen cookies that are overridden by the iFrame host, in that case you lose the auth cookie. Browsers react differently on same domain cookies.
Another problem might be X-Frame-Options, do you see any warning in the F12 console of IE?
I'm using facebook connect for a little website. This is my pop-up request URL:
https://www.facebook.com/dialog/oauth?client_id=".$app_id."&redirect_uri=".urlencode($redirect_url)."&scope=email,read_stream,publish_stream,publish_checkins,offline_access,friends_checkins,user_checkins&display=popup
The problem is, I have to buttons: Login and Cancel. When I click on cancel I go back to the login page, instead of closing the window. Any ideas?
Thanks.
This is a desired behavior of OAuth Dialog no matter which button user is clicks redirection (to URL specified in redirect_uri) occurs.
Some of the reasons that window isn't closed by clicking on Cancel and additional notes:
Closing of windows not opened by script is blocked in most browsers by default.
Closing of window is a feature that require JavaScript solution and OAuth dialog URL provides ability not to rely on this.
You can use JS-SDK with FB.login which will provide this for you and will close dialog.