Changing browser title not blinking browser in taskbar - javascript

There are a lot of tutorials on how to do this, and the crux of it seems to be changing the title constantly so the browser tab or taskbar will flash, however this doesn't seem to work for me.
I can see the tab changing its title, but it doesn't flash, so I am wondering if this is something which is no longer allowed by browsers?
I am using Windows 8.1, however have also tried Windows XP
I am using Firefox 25.0.1 and Chrome 31.0.1650.57 and neither of them react how I would expect.
As an example go to:
https://rawgithub.com/heyman/jquery-titlealert/master/example/index.html
(Make sure you click the shield icon in your url bar to allow the scripts to run on that page)
Then if you click the default example button and switch tabs, I would expect the tab hosting that page to blink or flash to indicate the tab has new content, however it doesn't do that for me, although I can see the text changing constantly.
Does anyone else have this issue and know how to solve it or why it occurs? I am looking to implement a feature in a chat system where it notifies you to new messages, however for some reason the code works fine and the title changes, but the taskbar or tab do not flash or anything and the users are really wanting this feature soon.
There seems to be no information on the internet related to this so im a bit confused and came here as a last resort.

In Firefox, tab flashes when title is changed ONLY if it is a pinned tab.

Related

How does mobile Safari decide to sleep tabs?

I have been working on a web application that relies on page auto-refresh. It works as I expected in desktop Safari, which is refreshing in the background even if it is not the primary tab. So long as Safari is open, that is.
On iOS, however, I've seen inconsistent behavior. It doesn't refresh if Safari is not open, but does still refresh if the tab is in the background. Again, this is what I expected.
However, it seems like Safari occasionally sleeps the tab, then reloads it when it's visited again. I'm not that surprised to see it, but I can't figure out the logic. There doesn't appear to be a timeout time that is consistent, so I'm assuming there is some other component at play. But I have no idea what it is.
Anyone know know this work? I had assumed it was documented somewhere, but I've not been able to find it.
Thanks!

"Click to use Flash" button doesn't always show on Safari

I'm working on a site that uses a video recorded via the user's webcam. The recorder library is not my code, but at a high level, it tries to use HTML5 (Media Recorder API) where possible and falls back onto Flash where not. On Safari, this means Flash. Basically, I supply the library with a div where I want the recorder to appear and it inserts it there.
However, some of my users were reporting confusion on Safari (the video recorder was not showing up) and I was able to reproduce this confusing situation. With Safari 12.0 on Mac OS 10.13.6 with Adobe Flash installed and enabled in Safari:
when I navigate to the page with the video recorder, I expect to see a "Click to use Flash" button on the video recorder area. But, when I first load the page, the area is complete blank. Strangely, it appears that the button is indeed there, but just not showing:
When I click on the area where the button should be, it responds (and prompts me to enable flash)
When I open the Web Inspector tool, the button appears (you can also see the code for the Flash object here that gets inserted dynamically)
When I simply resize the window, the button appears
I don't use Safari as my regular browser, so it's not like I have a highly customized configuration. Unless I'm missing something, this feels like a bug in Safari (I filed a bug report, but they specifically say they do not respond).
I've tried some javascript tricks to "re-draw" the element (e.g. hide then show) to try and get the button to show up right away, but without any luck. Obviously I can't tell users "resize the window" or "click in the middle where there is supposed to be a button".
Any ideas what could be causing this and how to fix it?

Hide address bar in Android Chrome automatically

I am opening a simple web on Chrome for Android. I need to hide the address bar without user interaction. I tried the window.scrollTo(0, 1) method, which isn't working. I think the newer browsers don't support it, but I installed Chrome 36 and it still didn't work there. I know that is a hack. But the whole web page I am displaying is a hack and I can't do anything about that. I can't use other browsers. I can't use fullscreen, because that requires user interaction. I can't make it into progressive app.
As soon as I manually scroll, the address bar disappears. So I thought maybe I could somehow simulate that. But I am lost with ideas.
I doubt you would be able to hide it since that would be a risk to the security of the Android user.

From website to app to website on iOS

I'm working on an iOS app some people want to link to from their website.
While I've managed to open my app from a webpage using schemes, I wonder if, when I'm done with what I have to do in my app, I can switch back to the original website tab in safari.
To my knowledge : it is pretty straightforward to open a new page in safari from my app but I don't know if it is possible to get back to the actual original page, just like the ios9 back-to-app button would do.
I could open a new page and close it straight away with some javascript, which would probably display the original page because it's the next one in the tab list... but it doesn't feel right (does it?)
I read stuff about ios9 deep linking, still can't find anything interesting.
To achieve this is to open Safari using URLScheme. However, (afaik) Safari App doesn't have a url scheme. If the user came to your app from Chrome, than you can use its url scheme
Google Chrome has the following two URI schemes: googlechrome:// and googlechromes://
iOS 9's back to app button can't be invoked programmatically, so you can't use it as well. However in jailbreaked devices an app can mimic that, maybe that will help you http://theunlockr.com/2015/08/23/enable-back-button-ios-8-video/
I could open a new page and close it straight away with some
javascript, which would probably display the original page because
it's the next one in the tab list... but it doesn't feel right (does
it?)
It doesn't feel right at all. Because the typical behaviour for turning back to previos (or any other) application among iOS users is pressing home button twice, and selecting the app. Maybe you can simply show a message, and ask user to return Safari.

open a new browser tab in background programmatically

Problem
I'm using a web-based feed reader, TinyTinyRSS. When sifting through the feed lists, I'd like to open interesting articles in new tabs - but in the background, because I want to read them only after I went through all feed items.
TT-RSS has a shortcut key "o" to open the article in a new tab, but it opens the tab in the foreground (window.open).
The question is now: To fix TT-RSS, I need to know how to open a background tab from javascript. It'd be awesome if the solution worked across browsers (Firefox, Chrome, Opera, Safari).
I understand the privacy issue about that, but having it enabled for one certified webpage is ok.
Existing (bad) solutions
Firefox
In about:config, set browser.tabs.loadDivertedInBackground to true.
This opens all the tabs from pages in the background, which is not what I want - I want it only for the one application/website.
Chrome
Chrome has a shytab extension. Works in chrome only and is for all pages.
Back when popup ads were a thing, this was called a "popunder" window. Popunders used to do something like this:
var popupWindow = window.open(...);
popupWindow.blur();
window.focus();
Popup blocking kind of messed around with what does and doesn't work, though- your mileage may vary.

Categories

Resources