Chrome mobile device emulator not able to load PDFs - google-chrome

I was trying to load a PDF document in mobile emulator(select any mobile device), it didn't show and kept loading while in the Network tabs, it was being downloaded and shown 200 status code for the PDF document.
While the same link worked in Desktop mode.

Related

How to automatically take screenshots of local files loaded in Chrome browser?

I have a bunch of tabs opened with index.html files in my Chrome Browser.
I want to be able to take screenshots of all these opened pages automatically.
The Chrome Browser built-in screenshot functionality doesn't work with local files.
What's the best way to bulk take screenshots? (It needs to be in Chrome Browser)
And I need screenshots of just the visible part (above the fold), not the whole page.

View PDF on Mobile with downloading

I have the following link to a PDF document on my website:
Example
On PC it opens up the document using a PDF reader, however on mobile and tablet devices it asks the user to "Download" the PDF to their local storage. Is there a way to make it open PDF documents on mobile and tablet without downloading? I want the view to remain in the browser.
Try to use Google Docs Viewer by appending URL
https://docs.google.com/viewer?url=
https://docs.google.com/viewer?url=https://mywebsite.com/mydocument.pdf

exporting .vcf contact in mobile web app capable aka HomeScreen app

I suspect this must be intentional on Apples part but I will ask anyway because it works from both mobile and desktop safari.
I create a simple .vcf contact from inside my web app and try to download (aka export) it.
This creates a .vcf file in desktop Safari that is actually downloaded where the user actually has to click that to get it into contacts. And in the mobile safari version (without saving to home screen), the exact same code will pop up a warning screen mobile .vcf warning which at least gives the user the opportunity to import the .vcf into contacts.
Admittedly neither the desktop or mobile safari use case it a good user experience but at least they work.
Whereas, the exact same code saved as a homescreen mobile app simply fails without error on an iphone (i.e
)
I have tried multiple ways to export from the app (most of which work from safari mobile or desktop browsers if NOT web app capable)
as a blob from base64 text/vcard
as base64 text/vcard
using window.open(vcftxt); // where vcftext is base64 text/vcard
using location.href = vcftxt; // where vcftext is base64 text/vcard
using an a tag with download= and href= vcftxt url
All the above work..just not in a homescreen app that appears native
code example (run on iphone safari...not tested on android)
https://www.airbridgelabs.com/s/0/app3.html?sd=100 - Click on contacts logo at the bottom when this page opens in safari and you will see the warning which still allows the user to open the .vcf in contacts
https://www.airbridgelabs.com/s/0/app3.html?sd=100&tm2=100 - This will walk you thru saving to home screen or you can simply save to home screen manually without the tm2 parm. click on the contacts logo at the bottom when this page opens in safari and you will see nothing. Safari developer remote console shows no errors or warnings...simply does not work.
I figure I can probably pass the created .vcf to a page on my server which in turn opens the .vcf which will likely then export it to mobile contacts..but that is a lame solution which still requires the user to be online to save an embedded contact.
And please don't use the argument that this is about security. If it was about security then you wouldn't be allowed to do the exact same thing from a desktop page, or mobile safari page or hybrid native app...and you can. This looks like Apple simply reducing the value of mobile web apps that look native.
What I am looking for is an offline work around to simply save a mobile contact already coded into the mobile web app capable content the user intentionally created.

Angular front end: strange Chrome behavior with 2 devices

I have a local Web Site created in Angular 2. I access to my Web Site via: http://192.168.1.17/.
I have this strange situation:
On my phone, I go on my Web site (http://192.168.1.17/).
Then, on my computer, I do the same: I go on my Web site.
Finally, I scroll the web page with my mouse and I see the page scrolling automatically on my phone !
Why there is a communication between my two devices ? Is it a communication coming from Chrome ?
Note: if I 'Inspect' the page in Chrome, I don't see transfer on network in 'Network' tab.

HTML5 offline enabled web app

I'm trying to build a html5 web app to be used in offline mode on iOS devices.
I've created the cache.manifest file and put my html, css & img files.
I have two main issues with my offline web app:
1) Offline Mode Problem. Procedure:
a) open the webpage in Mobile Safari
b) bookmark it to the Home Screen.
c) I close the safari
d) put the app on airplane mode.
e) open the app from home screen app icon
I get the error "Turn on cellular data or use Wi-Fi to access data", but if I open the same location from Safari it works fine.
The only way I can solve this is before I put the device on airplane mode, I have to open the app from homescreen and close it and put the device on airplane and when I open the app afterwards it works fine.
Is there anything wrong in my way of making the app or is this the way Apple has implemented the "add to home screen" feature, so whenever a user add a offline enabled webapp the user should at least open it once before its working as an offline version?
I thought this was the entire purpose of an offline app!
2) Multiple pages
I have created two sample pages(index.html & subpage.html) for the web app offline purpose.
When I click the app icon from the home screen the web app is opening fine in the full screen mode, but when I click the link to the subpage.html from index.html it opens it on safari browser thereby goes out of the fullscreen app mode.
I have tested the above mentioned problems in the following devices and same errors/userexperience I get.
iPhone 4S - iOS v6.1
iPad Retina - iOS v6.1
I'm no expert, but from what I've learned, the page must loaded at least once while connected to the internet. The Html5 offline works great, but it can only load the page offline after it has been loaded before. The iPhone cannot open an app when it hasn't downloaded the .manifest file and .html, .js, .css, etc.