![]() Note: as a best practice, I informed the user on the intermediary page that I’m redirecting them and provided an HTML link within that intermediary page should the redirection Javascript fail. AJAX request gets authentication URL and updates the window’s location property (basically, redirects our allowed popup).Javascript opens a window to an intermediary page, storing the window object as in a variable. ![]() This meant it was asynchronous and Chrome was suspicious. In this case, it was a result of a user’s action, but the call to window.open() wasn’t happening until the success callback of my jQuery.ajax() call was fired. If it’s delayed in anyway, there’s a good chance it’s going to get blocked. Smart popup blockers will allow a popup if it is directly associated to a user’s action. ![]() Thanks to these two posts on StackOverflow, I realized that the problem was Chrome (among others) was blocking popups that weren’t a direct-result of a user’s action. My call back URL closed the window with Javascript.I popup a window with that URL as the location.I call an AJAX request to get an API generated authentication URL. ![]() The team I was working with noticed that usually Chrome (among others) was blocking the popup I was calling via Javascript. So, I was working on a project the other day that authenticated users via LinkedIn and it was using a popup window. How to Bypass Google Chrome’s Javascript Popup Blocker ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |