Displaying what is stored in the cache - javascript

I am currently making a web app and I have used a manifest file to get my web app to work offline. This works great and using Google Chrome, Opera etc I can view what is being cached by right clicking, inspecting the element and viewing the resources.
The problem I have is that I want to view what is stored in the cache in the app when it is being used on an i-pad. I have give this a Google but cant seem to find anything. Is there a way of displaying what is stored in the cache using some JavaScript or JQuery and then having this displayed on a web page within the app.
The app consists of a webview which is currently pulling in other html pages which are being stored in the cache using the manifest. I want to add a simple settings page where what is being stored in the cache can be viewed within the app. Hope that explains enough I would really appreciate any help with this matter.

I don't know of a way to get at this information with JavaScript either, but here are the alternatives I use.
In Mobile Safari, I connect the device to a Mac, open Safari on the Mac, open the site in Mobile Safari or open the native app going to the screen with the UIWebView, go back to the Mac and open the Develop menu. From there you can select the Storage option and view what's in the appcache.
In Chrome, you can view what's stored in the appcache using the URL chrome://appcache-internals/.
If the appcache was saved successfully, you could also simply go to the file itself in your browser.

Related

Can't print a flash application within electron

My problem
I am currently developing an electron (v4.2.10, I can't upgrade) application with the primary purpose of browsing on a specific homepage (using electron-navigation) and making their flash games playable.
I have included the Pepper Flashplayer (v32.0.0.156) for this purpose and so far it is all working well.
However when trying to print a page including a flash game it will print a blank page. Trying the same in my current versions of Chrome or Firefox (with current flash player) yields the same result, however in Edge it works.
What I've tried so far
I have no access to the actual pages of the site or any of the swf files
The pages with the swf files are http (I tried setting browserWindow web preference disableWebSecurity to true, no change)
I have tried different versions of the flashplayer
Screenshotting the page is sadly not an option
I have looked into the plugin nw-flash-trust but I am accessing an external source
When I downgraded electron to v3.0 it actually managed to print most of the display, which may point to it being related to the underlying chromium version
Does anyone have an idea how I can fix this? I have absolutely no knowledge of flash development itself. I would love to be able to print on v4.10 too. Many thanks for any help!

iOS not updating JavaScript files

I was updating my internal website.
I have a folder that has images and a folder that has javascript files.
I was updating the javascript files on the server and testing on my desktop and everything was fine.
I went to look at the website on my iPhone and the updates weren't there.
I used web inspector on my mac to see what the issue is, when I went to the resources tab in the developer console and had a look at the js file it was the old one that didnt contain the changes. How do I force my iphone to get the new js file?
Clear your cache by going to Settings > Safari > Clear History & Website Data. This will remove all the history, cookies, and caches for web views (including Safari) on your device. If you'd rather not nuke everything, you can go to Settings > Safari > Advanced > Website Data and swipe left on a specific URL to delete all cookies and caches stored by that specific site

How do I launch a standalone web app from mobile safari using javascript?

I am developing a standalone web app that installs on iphone homescreen.
It has a calendar function that the user can download an *.ics file directly into the iphone.
However, that cannot be done from within the standalone web app, so I have a punch out url to mobile safari so that it will work.
All that works fine...
However, after the ics file is loaded into the calendar and closed, it returns to the mobile safari page where I in turn close that by using onclick='self.close()'. That works fine too...
After that page closes I want to then launch back into standalone app so the user is returned to where they were...
How do I launch my own web app from a mobile safari javascript code?
All the searching shows me how to go from standalone to mobile safari,...I want mobile safari to standalone.
I have seen the windows.location="myapp://myparam" but cannot find proper syntax to get it to work.
What is the syntax for this?
Any other solution is well received too...will need to find Android solution too, but it is not as crucial...
Thanks

HTML5 File System Info Bar Not Responding In Kiosk Mode

I am creating an application that runs in chromium portable in full screen with the --kiosk flag. It is written in HTML, JavaScript, and CSS. I am also using the HTML5 File System to store some large sets of data. The application opens up in full screen, and the info bar to request permanent storage pops up.
The problem is that, while running in kiosk mode, you cannot select either "OK" or "Cancel" to the file system's request to store data. You can only close the info bar with the "X". This results in the file system not getting any kind of quota and the application fails.
So is there a way to have unlimited storage for an application running from "file:///"? I have tried using --unlimited-storage but it doesn't seem to work for a webpage.
Is there a way to open up in full screen without using --kiosk? Any other work arounds or suggestions are welcome.
What version of Chromium Portable are you using? I had a similar issue awhile back, but I don't have the same problem in the newer versions. I am using the latest version as of now which is Chromium Portable 30.0.1599.10 (released on 2013-08-21).

Is localStorage safe? Can I access it from another app?

I am making a jQuery Mobile and PhoneGap app.
I am about to save some data to local storage. I am wondering if it is safe on mobile browsers (Android, iOS and windows). On PC I am able to check the values in FireBug. Is it possible somehow on mobile devices? Can I access in app A data specified by app B?
Thanks for help.
At least in iOS, if it's a phonegap app the localStorage is only accesible from the app.
To check values while you are developing, you can try debug phonegap.(only works on webkit browsers). If you put a name there, it creates a script tag to include in your index. If you include that script tag in your index and execute the app you can see a remote web inspector for your app.

Categories

Resources