For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 9 replies, 3 voices, and was last updated 12 years, 9 months ago by
support-michael.
-
AuthorPosts
-
TorstenHinzeMemberSorry for my bad english, I hope you can understand.
I have a html widget with an iframe to an external page that will change daily.
In cache.manifest I have registered under this network.
When I start the app, the widget will also be displayed updated.But a Android-App will never closed accurate.
How can I make it, that the html widget also updated without close the app?
Would be a button or a update when changing the screens beautiful?I do not, can someone help me?
May 25, 2013 at 5:07 am #339392
TorstenHinzeMemberCan nobody help me?
Please.
How can I reload a webpage in a html-widget from server in a android native app?May 28, 2013 at 6:09 pm #339470
support-octavioMemberHi tiaetsch,
Here is a thought, let’s assume that the iframe site is cached via appcache for offline support.
So if you want the iframe to site to reload when page updates automatically while app is running then do this:1) On server update the page content and then modify the cahce.manifest file (must change its byte size). On restart of the app will detect the modified cache.manifest and load the changed resources.
2) For a running app to detect and load a changed page then force the iframe to periodically reload the remote page. Use
<META HTTP-EQUIV=”refresh” CONTENT=”15″>This will then cause the appcache to kick in and load the remote content and cache it.
the 15 is seconds. Set it to whatever frequency the page needs to update.May 30, 2013 at 10:26 am #339535
TorstenHinzeMemberHi octavio,
many thanks for answer!
A refresh of iframe is a good suggestion, but where must I place the metatag, in the html-widget?Is there also a posiibility to refresh the html-widget (iframe) with a button in mobione?
May 30, 2013 at 1:26 pm #339543
support-michaelKeymasterAttached is a simple mobione design that embeds an <iframe> in the screen via an HTML widget. See screenshot below.
See attachment ss1.png
The iframe loads an html page that has this metatag to force a reload every 30 seconds.<META HTTP-EQUIV="refresh" CONTENT="30">The reload button uses the following hack in the jquery snippet to reassign the iframe.src its current value.
//hack using jquery code to reload the iframe $('iframe').attr('src', $('iframe').attr('src'))See attachment iframe-reload-test.mobi
Attachments:
You must be logged in to view attached files.May 31, 2013 at 6:23 am #339558
TorstenHinzeMemberMany thanks, wayne.
Unfortunately, the iframe will always be loaded only from the cache, although I have the page listed in the cache.manifest under “network”.How can I prevent loading from the cache there?
How can I ensure that the page is always loaded from the server?I have more than 1 iframes in my app, how can I refresh a concrete iframe?
When I click on the button, a iframe from another screen is loded.I want to pass the app as NATIVE.
I’m desperate 🙁
Attachments:
You must be logged in to view attached files.May 31, 2013 at 10:41 am #339570
support-michaelKeymaster>Unfortunately, the iframe will always be loaded only from the cache, although I have the page listed in the cache.manifest under “network”.
To confirm that I understand this correctly let me setup a scenario.
1. MyApp.html includes <iframe src=”remoteData.html”>
2. remoteData.html uses appcache
3. and you want remoteData.html to always load from the web, not the cacheIf this is correct, here are my thoughts:
1) I’m not 100 percent sure that appcaching will work for your iframe provided content. I googled and found that some browsers had errors as recent as a year ago. So I can’t say what your success rate will be across iOS and android versions.
2) The main html page that specifies the <html manifest=”cache.manifest”> will always be cached even if it is not listed in the manifest file.>I have more than 1 iframes in my app, how can I refresh a concrete iframe? When I click on the button, a iframe from another screen is loded.
Here is an example:
//jquery selector to find the iframe node of the html widget with id property "html1" $('[id$=html1] iframe') //hack using jquery code to reload the iframe, set src to itself var myiframe = $('[id$=html1] iframe') $(myiframe).attr('src', $(myiframe).attr('src'))June 2, 2013 at 4:44 am #339587
TorstenHinzeMemberMany thanks, the reload of the iframe works, but is out the cache.
I read in intenet of preventing iframe caching in browser, but I do not know how can I realise this in mobione.
Can you help me with this?<iframe id="frame5a" src="http://www.tiaetsch.de/portal/vertretung/klassen/5a.htm?id=[timestamp]"></iframe> function setTimestamp(){ var myIframe = document.getElementById('frame5a'); var timestamp = new Date().getTime(); myIframe.setAttribute('src', myIframe.getAttribute('src').replace(/\[timestamp\]/, timestamp) ); }June 2, 2013 at 7:03 am #339588
TorstenHinzeMemberYippee, I found another solution for no caching iframe with .htaccess, that works.
Thread can be closed.Many greetings
thJune 2, 2013 at 12:36 pm #339598
support-michaelKeymaster@tiaetsch
Thanks for the update. -
AuthorPosts
