How to get rid of every possible website data on phone - android

I have an issue with displaying an image in my web app and I can't think of any other reason but some strange cache situation. The image has the following CSS properties so its always showing a square part of the image:
object-fit: cover;
height: 100vw;
width: 100%;
Now when I test the app on my phone the image gets stretched like object-fit isn't supported by the browser. But when I test the same on my girlfriend's phone it works perfectly. Strange part is that we have the exact same phone(samsung s10e) running the same os and using the same browser(Chrome for Android) and browser version (83+). I tried reinstalling and deleting temp data from any browser installed but I can't get it to work. The app is using a web app manifest but no service worker (yet) if this helps.
If someone has any clue how to go from here please let me know.

You should clear your browser cache. Here's how...
Open chrome and click more. Click more tools then clear browsing data. Choose a time rage or all time. Check cookies and other site data and cached images and files. You can try just clearing cached images and files first but for a full clear do the other one (this one may sign you out of most sites)
Clear clear data and your done.
If it's that you want your one web page not to be cached on all browsers (supported ones only) then look into the pragma meta tag.

Related

XDK - How to load an image from an URL in android using img tag

I made my app in XDK, but until now I was using it purely online, in a server. Now I want to 'convert' it into an android app. The main problem i'm having is that in some areas of this app, I need to import an image from an URL, like so:
<img ng-src="https://i.ytimg.com/vi/3YJpUROvQAk/maxresdefault.jpg">
But in my android device, all images do not load.
Is there any way to load an image from an URL into a img tag with XDK Android?
This is generally not a good idea, because it means you are dependent on the presence of a good and working Internet connection when your app runs. This cannot be guaranteed:
the device network connection may be slow or off
using the network to load these images each time you run uses valuable (and potentially expensive) data on your customer's data plan
lack of a connection can, at the worst, block your app so it appears to be hung
If you want to do what you are attempting to do you'll need to make sure your whitelist is configured to include access to the locations from which you are attempting to load the image. This is probably why it is failing.

Webview app code security

I have an app which runs mostly in webview and opens an html file from my server and most of the logic happens in its javascript files. If you open the html file on your browser you will have all the code with a simple inspect element. I wanted to ask how can I secure my application and prevent my code from being seen and copied.
Thanks
By default WebView doesn't allow debugging of its contents (unlike Chrome), unless it runs on a debug build of Android. Thus if you don't reveal the URL anywhere, users will simply not know what to open in a browser.
You can also minify/obfuscate your JavaScript code to make it barely readable, even if anyone somehow opens it. This also has a benefit of reducing download size.
A radical approach would be to generate all the results on the server and send them to clients. This way, your clients will not have any code at all on them. But this will greatly complicate any attempts to make the results interactive.

Site parsing and opening with slow internet connection

I am making a network app that works with a few news sites. I have an option to view and download articles (for reading in future). There is no fast mobile internet in my country (mostly 2G with the speed up to 15 KB/sec) and my app doesn't work really well with the slow connect though it's perfect with fast connection. As I have seen from logs it can't establish the connection. When I try to open the article it doesn't load at all or goes into infinite loading. When I try to save the article it simply saves the blank file. How can I track these mistakes and catch them? And what are the correct ways of handling it?
I suppose that my code is irrelevant as it works correctly with Wi-fi. I think I simply need to add lines, not to edit them
ok, you need to manage the information very good, you need define the package size to download, you need a webservices that allow to you to manage the information one by one, for example you need design packages no more than 500kb size to download, when this package is downloaded you can show something in your mobile and continue downloading the next package in background.
500kb is only an example you need to test what is the maximum data size to download and create packages like that in your web services

Android - getting statistics of page loading

I have a project for an Android app, which basically loads a certain web page (user defined), and show statistics about that page loading and files.
So basically.
I type: www.imgur.com, the app downloads the site (loads it in background, the process shouldnt be visible), and then the app shows stats like this
Javascript files: 4, load time: 0.3s, size: 30kB
Images: 12, load time: 0.7s, size: 1.5MB
etc.
I already made a few android apps, so I'm rather asking about what to look for?
My only "tip" is to try to get some browser core (like Chromium) and try to get something from it, but Im really not sure where to grasp it.
I know I could manually "download" that page, but since I need it to also process Javascript and AJAX, so it wont be that easy.
Any tips are very welcome.

Why one of these images doesn't load on Android app?

I have a Phonegap app which runs ok in Android and iOS, except for one reason: one of the images below don't load for nothing in the Android app, but works ok on iOS:
It works: http://mobile_server.s3.amazonaws.com/banners/assets/000/000/021/medium/serra_azul.jpg?1410372361
It wont: http://mobile_server.s3.amazonaws.com/banners/assets/000/000/017/medium/boscato_banner_app.jpg?1410372359
I checked many things like image size, especial characters, network loading (debuggin' in Chrome browser), but I think that those are not the reason.
The method im using to load the image is just a <img src="..." />. Im sure that there is no problem here, because the first image works perfectly.
Maybe someone can check these two images and tell me the difference that one has to another which can make the second image don't load in Android app.
Thanks,

Categories

Resources