Pushwoosh TTL for different browsers - browser

I Am using Pushwoosh, on createMessage() api call, I am able to specify the message's TTL parameter. I am currently testing in Chrome and Firefox.
In the createMessage() call, I am specifying 'chrome_gcm_ttl' => 300, which means that the message will live for 5 minutes.
(I am assuming that Firefox and Chrome both use this value as they both use GCM/FCM)
I have tested this in chrome. (closed the browser, sent the message, wait 4min30s, I am able to receive the push) - Working as intended
However, in FireFox, I have tested on multiple occasions, And messages are never received after the 1 minute mark after numerous attempts. (But are able to get messages below the 1 minute mark)
Is this intended behaviour? Why is the TTL ignored in FireFox ? Where is the TTL for firefox set as 60 seconds? Is there another way to override this value? Or is it stuck at 60 seconds no mater what? Firefox browser is 52.0.2

Indeed by default Firefox push TTL is set to 60 by Pushwoosh, so yes, it is an intended behavior and currently it is out of user's control.
I suppose the best idea is to contact Pushwoosh team and submit a feature request via this form or at their GitHub repo.

Related

Dialogflow fulfillments timeout after 5 seconds, How can we overcome this limit?

Imagine the following scenario:
Our client starts a conversation with our bot regarding a problem with one of their websites.
We go and check the website in our backend through our fulfilment web service and if there is no obvious problem we want to then generate a screenshot of the website and present it to our client.
The screenshot could take more than 5 seconds to take as many websites take longer than 5 seconds to fully load.
As a result the response timeouts.
We can't force our clients to redesign their websites to lead faster than 5 seconds just so that our chatbot can handle their request.
I assume there are many other real-world examples in which fulfillments can take more than 5 seconds.
Example:
Client: My website www.example.com doesn't load.
Bot: I just checked the website and it loads fine for me. Here is a screenshot of your website for you to check:
{Image goes here}
The short answer is - you can't.
There are some tricks that work sometimes, but they won't work in all scenarios, and aren't good practices anyway.
Your best bet would be to respond to the user with a message saying you're doing some checks and diagnostics and to ask for an update in a moment (and, if possible, provide a Suggestion Chip prompting them to ask for it). After sending that message, launch a background task to do the checks to see what might be going on and take the screen shot. When they ask for an update, you can report with what you have (latency time, the screen shot, etc) or if things are being slow and that you're still checking.

High response times with Ajax True Client script

We are facing an issue with Ajax True Client script. When recording and replaying the script. One transaction took more than 60 sec time to load the page. Same behaviour observed after executing scenario in controller as well. But, if we manually perform the same transaction, it took only 8 sec. There is huge gap between the expected response times. Can any one suggest the fix?
This happens because of external resource download attempts by the script, which are not visible to you when you manually browse the page.
For example, if the page requests data from Google Analytics, or Facebook, and cannot access these sites (due to company restrictions, firewall, etc.), the response time would jump up to 60 seconds (timeout), but when you browse manually, you will not experience the timeout, since the browser behaves differently.
To resolve this issue, you should first find out which site is the script attempting to download data from? You can do this using a browser's developer tools (such as F12 tool in Google Chrome), and looking at the "Network" tab. Once you use this tab and browse to the web page, you should see the external HTTP requests. Make a list of these sites.
Once you know which external sites the page goes to, you can then use the Utils.removeAutoFilter JS command in your TruClient script:
From the Truclient Toolbox, choose "Misc" > "Evaluate Javascript Code" and add it to the first line of your script.
Then you can set the JS code in this action to:
Utils.removeAutoFilter(url, isIncluded);
for example, to prevent the script from downloading data from facebook:
Utils.removeAutoFilter('http://facebook.com', true);
Utils.removeAutoFilter('https://facebook.com', true);
Utils.removeAutoFilter('http://www.facebook.com', true);
Utils.removeAutoFilter('https://www.facebook.com', true);

Background Page Doesn't Show as Active User

I added Google Analytics to a Chrome Extension. It is reporting events correctly as well as recording popup page views. When the extension is reloaded it correctly records a view of background.html which I explicitly call.
Problem: Despite the extension having a persistent background.html page, "Active Users" in the Real-Time section of GA shows 0. I would like to be able to see the # of concurrent users of the extension at a given time. Is there a way to do it?
Possible Solution? - When I open the popup it displays an active user for some number of minutes before dropping back down to zero. Do I need to create a heartbeat function of some kind that pings GA every X minutes to keep a user active. It seems a big "chatty" to do that.
Is there a better solution?

Sending POST requests to Google Action/API.AI or sending responses which take more than 5s

My fulfillment needs to do a lot of processing after receiving a certain request from Google Action/API.AI and the default response timeout is 5s.
https://developers.google.com/actions/components/fulfillment#nodejs
Is there any way I could send a delayed response or send a POST request after the results are ready?
The short answer is no - you must respond within 5 seconds, and there is no way to send a notification back through the Assistant at this time.
The slightly longer answer is that we know notifications are coming - but we don't know if there will be an API for them. There have been rumors about other ways that may be coming that allow us to work around the 5 second limit.
The even longer answer is that, if you are using Action Transactions (ie - allowing the user to purchase or reserve something) you can send updates after the fact. However, Transactions are still in developer preview and don't work on all surfaces (they don't work on Google Home at all, for example).

Getting very slow ajax responses when requesting product page

I'm building a Chrome extension for the steam community, and this extension has some functions to get the user games list and scrap their product page to get some information about every game.
Any of the requests done by the extension to the API is almost instant, but when I try to load an app page (like for example http://store.steampowered.com/app/440/ ), the response is delayed up to 40s.
At the end, the page loads and the ajax request is successful, but the waiting times are just too high.
I have noticed that this behaviour is not consistent, and on other computers with the same exact extension code and internet connection theresponse is instant, and on the same computer with other browsers the delay is not there either.
Why could this happen? I'm not starting multiple ajax calls, and the extension waits before finishing a call before making the next one.
Please, see attached image
Thanks

Resources