Google pagespeed insights uses android AGENT for desktop - pagespeed

I often use google's pagespeed insights. But lately I'm facing problem with it's results.
For desktop view somehow it uses Android phone agent to test.
Made simple script to show agent and made test in tool for the url and here are results:
Any idea, how to prevent that? Or why i'm getting such 'tests' with wrong Agent?

Are you sure that there's no caching or something on the page you're testing? We cannot reproduce the android UA being used for the desktop test.
If you analyze https://www.google.com/search?q=what+is+my+user+agent or https://www.whatismybrowser.com/detect/what-is-my-user-agent you'll see a desktop UA in the desktop tab.

Related

MS Teams custom tab SSO not working on desktop App

We have set up our application as a custom Microsoft Teams app. The application is working just fine in the browser but fails to load in the Desktop APP. The application uses Azure Active Directory to perform the login through the saml2.0 implementation and is embedded through an iFrame.
Can't find a good way to debug what the issue might be. The AAD logs are always empty and the DevTools do not show what's happening in the embedded iFrame.
Has anyone encountered this issue before or might know of a way to try and debug it?
This is actually quite common, that it works fine in browser but not in desktop, and there are probably several reasons for that, not least of which that the popup experience is easier to control in browser versus the actual Teams desktop sandbox. It's also common, I think, that people try to launch their own popup to handle the login, which you can't actually do in the Teams desktop. It's a bit wierd, but basically Teams desktop launches a popup for you, which loads your login page, which in turn then needs to do a -redirect- because you're now in a new browser page.
In any case, in my experience, it's always because I've done something wrong, that's why desktop doesn't work correctly. My suggestion is to follow the docs -exactly- and it should work fine.
The most important doc is this one, which really does give some quite straightforward step-by-step. You can also check out this video which helps as well.

How to build a desktop app from a web app whilst being able to capture the communication with the server?

I'm trying to transform a web application to a desktop one without rewriting the code. Two solutions I found that seem promising are Qt with WebEngine (WebView) and Electron. The thing is I would like to be able to capture the communication with server, for example database queries and stuff like that and treat it locally. Is that possible using either of that tools? If so do you have any tips on how to go about the issue?
Thanks in advance.
If you don't have enough time to build a desktop app, I recommend to build hybrid app. (Native App + Web). Use Cache, I am not sure about Web Database.
you can read these..
Web Cache
Web DB (it works on browser like Chrome, Safari, Android Browser...)
Just for future reference I decided on Electron and used onBeforeRequest function to capture the http requests.

Converting WordPress website to Progressive Web App

I am building a Progressive Web App but there is a very little documentation and support online so far. I am listing down all my questions in this email.
What is the current support of Service Worker API (Offline Mode) for
desktops? I wrote a small app which worked in offline mode for
mobile (Android-Chrome) but not for my Desktop (Chrome 42). We need
to configure development environment for this so we need to know
what will we be needing to test our apps. It doesn't work on
IOS-Safari/Chrome even.
The service work uses caches extensively and there is a very good
way to debug or unregistered service worker internals on Dekstop
Chrome; but if I run my application on Mobile how would I remove
service worker cache?
If I have a responsive application (A WordPress site) and need to
convert it into PWA; would I need to rewrite the application with
RestAPI for mobile version all again? (Read App Shell of PWA). In
PWA, application shell is separate from data however in CMS like
WordPress data is not separate from the UI.
I have been looking for these answers for very long and not being able to find any proper support.
What is the current support of Service Worker API (Offline Mode) for desktops? I wrote a small app which worked in offline mode for mobile (Android-Chrome) but not for my Desktop (Chrome 42). We need to configure development environment for this so we need to know what will we be needing to test our apps. It doesn't work on IOS-Safari/Chrome even.
Safari is not supporting service workers right now but it should work in Chrome 42 although you should consider to update your browser. Anyway, you can check the state of the art in a variety of places:
Service workers: https://platform-status.mozilla.org/#service-worker
Push API: https://platform-status.mozilla.org/#push
Background Sync: https://platform-status.mozilla.org/#background-sync
More about SW:
Is Service Worker Ready? https://jakearchibald.github.io/isserviceworkerready/
Can I Use? http://caniuse.com/#feat=serviceworkers
The service work uses caches extensively and there is a very good way to debug or unregistered service worker internals on Dekstop Chrome; but if I run my application on Mobile how would I remove service worker cache?
You need to debug Chrome for Android from Desktop Chrome.
Anyway, the URL chrome://serviceworkers-internals is available on Chrome for Android although there is no an easy way of clearing offline caches.
If I have a responsive application (A WordPress site) and need to convert it into PWA; would I need to rewrite the application with RestAPI for mobile version all again? (Read App Shell of PWA). In PWA, application shell is separate from data however in CMS like WordPress data is not separate from the UI.
No. Actually, WP has a very well architecture to decouple content from theme. The problem is that run on the server but you don't need your site running on the client to become a PWA. Mozilla is supporting a suite of WP plugins to help progressivizing your WordPress installations:
Offline Shell [github] identifies your shell assets (i.e. theme files) and cache them in an offline cache.
Offline Content [github] identifies your dynamic content and cache it as the user visit it.
Web Push [github] allows you to push real time notifications to your readers as soon as you publish new content.
Add To Home Screen [github] engages your readers by putting your WordPress in the Home Screen.
They are all very young plugins but you can track them on GitHub and contribute if you want!
A very nice and helpful answer is already added by #Salva, but I thought let me add few things which might be helpful.
For 3rd part, I have worked on an automatic progressive web app converter platform, https://www.escalatingweb.com. I think you can use this platform to convert your web app on WordPress into progressive web app. You can use it to convert your web app into pwa within minutes.
I have also written a very nice tutorial to use automatic pwa converter platform http://www.techromance.com/2017/07/22/automatic-pwa-converter-platform/.
For 2nd part,
Just to add to above answer, and for testing purpose, you can delete all the cache for a particular website from site settings, which will also clear service worker's cache.
For 1st part, nothing to add as such.
P.S. Please nobody be offended in case they find it as a cheap way promoting my platform. The intention is just to help the community, either by building the platform or making it aware to the needful audience.
Thank you #McNab for the suggestion. :)
I also using a Wordpress site and there is a plugin can solve your problem. Instead of installing lots of Mozilla's plugin, you can install Super Progressive Web Apps plugin (search for it in plugin install), it works perfectly. Tried both on Android phone and IOS
https://wordpress.org/plugins/super-progressive-web-apps/

Basic authentication with StageWebView

Is there a way to perform basic authentication using StageWebView on mobile devices in Flex?
The problem is that mobile (iOS, Android) implementations don't provide authentication dialog and documentation about this is pretty unclear.
On this link:
http://helpx.adobe.com/air/kb/stagewebview-differences-platforms-air-sdk.html
it's suggested to use URLRequest as a workaround, but I already have URLLoader that successfully authenticates and loads data from the same service and it doesn't affect StageWebView.
I'm having the same issue. The problem is after authentication (after the app install page through facebook), it goes blank. I at least found that the url is "m.facebook.com/dialog/permissions.request" and then continues with a massive amount of get variables.
From my research, I believe this is a pop-up window that runs an auto-close function but doesn't seem to work in Adobe AIR. I've tried running a TimerEvent in a "LocationChangeEvent" to nav back (have to run 2 back to back because the webViewObject.historyBack() method does not support parameters), and this works but only after the app has been installed on their facebook account successfully which in turn affects the ability to even install it to their Facebook in the first place.
I also tested reading the url to trigger callbacks but the one major problem is the "Install" page and the "login successful" page have the EXACT same url entirely, at least from start to finish. Haven't tested the title yet due to my frustrations lol...working on that.
If anyone has any suggestions, this would be supremely helpful and seriously appreciated!

iPhone Phonegap based app load External website made of componentone

My Client wants a native iPhone App that displays their mobile site optimized for iPhone developed using asp.net and ComponentOnes Studio for iPhone. i was planning to use a PhoneGap app which calls an external URL using JavaScript and do it after showing the splash screen. but according to phoneGap FAQ its most likely to apple to reject an app that loads external URL ? just need somebody to clear me on the whole process. isnt it possible to create an app like that ? i've seen various iPhone apps that do this (eg: cydia).
else what care should i take if i'm to develop such an application.
I think you have answered your own question, while it is completly possible to create such an app with Phonegap, Apple isn't going to approve an app that doesn't have functionality when running unconnected (though how much functionality with Apple is never clear). In fact, there have been at least one report on the Phonegap google groups list of app's being rejected because it was just a "web clip", meaning that the app could have just been done as a website, apparently you have to add some functionality, my guess being services exposed by Phonegap, that you wouldn't be able to do on just a website..
And it is more to the point that the app that you chose to use as an example of a "web app", is only available on jailbroken phones.

Resources