How to Disable Page Caching in Trusted Web Activity App? - google-chrome

I created a Trusted Web Activity App for one of my friends.
Link: https://play.google.com/store/apps/details?id=com.grodudes.app
It's working absolutely fine but I am facing a small problem it is showing the cached pages even when the device is online and it causes problem like showing the user is logged out when moving to a different page even though he is logged in. Reloading the page fixes it.
How can I fix it?

Related

Changes to Wordpress Site not showing when logged out

I've recently transferred a wordpress website from http to https. After this transition the website stopped loading properly when not logged in, but it loads fine when logged in. While investigating further I also discovered that this only occurred on certain pages of the site.
So I looked for some solutions to the problem and tried disabling a few plugins. But I discovered that when I make a change (for example disabling a plugin or changing the layout) the change only appears if I am logged in, and doesn't show at all if I am logged out and viewing the site.
I have tried clearing the cache on the website disabling and re-enabling all plugins but nothing has worked.
This is how the site looks when logged in:
https://i.stack.imgur.com/YB0KO.png
And you can see how the site looks while logged out here: www.onlyphysics.org
The theme I am using is Divi.
I would be very grateful for any help I could get on this issue!
I can see that CSS files are not being loaded (404 in console). This relates to css static cache. Browser is still looking for the old css generated file.
Go to Divi Theme Options > Builder > Advanced > Static CSS File Generation
And also open your site in Incognito or private window afterwards to see. There might also be additional caching on your site, which you'll need to empty afterwards to.
More info / Source: https://divitheme.net/clear-divi-cache/

Favicon doesn't refreshes even after forced refresh

I built two websites on my localhost. I used one favicon for the first website.
Later when i started developing the second website. I copied first website and started working on it. I changed code and files for the second website.
But when I run the second website on my server why does it shows favicon from the first website?
I tried force refresh it, clear cache. But nothings helping.
Try clearing your browser cache but you might also consider setting up a named virtual host both sites.

Have to refresh page with HTML5 offline

I have written a HTML5 offline Application.
It works alright so far, but I have to refresh some pages to make them run right.
For example a network site:
The page is noted in the manifest file under NETWORK:.
I can access it, when I am online, when I go offline, it is still running,
even if I refresh the index.html.
Just if I refresh the network site, I shows me, that I'm offline.
A site that stores values (localstorage):
When I reach the site from index.html the stored values won't be shown.
After refresh the site runs like it should.
For the Link of the index.html I tried "data-ajax='false'" and "rel='external'".
This worked while online, but it didn't work when I was offline.
Thanks for your help.

Google Chrome intermittent load issue: possible to Programatically disable "Predict network actions..."?

I'm having a very strange problem with a site in Google Chrome:
When I click on a link (from a list view to a detail page), the page hangs and I Chrome throws up a dialogue asking me to kill the page. The page is never displayed.
But if I navigate directly to the page, it loads in Chrome without any problems. Both actions (clicking on a link or navigating to the page) work fine in Safari and Firefox.
Disabling "Predict network actions to improve page load performance" in Chrome's settings seems to fix the problem, but this is not a viable solution as I don't have any control of my user's browser settings.
Some more detail about the situation:
The link is just a regular <href>. I'm not doing any javascript
click() handling or anything else. I'm not using any 'prefetch' or 'prerender' <link> elements.
The pages all validate using the W3
html5 validator.
The page I'm navigating to loads a lot of JS, uses Knockout.js for rendering and loads a video file over HTTP.
On the occasions that the page does load (after a very long wait),
Chrome appears to have rendered the entire page in the background and
loaded all external resources. If I navigate directly to the page it
doesn't preload anything though (I'm using knockout to show a 'please
wait' message while the external resources load).
When I log the network requests using Charles, it appears that
Chrome loads the HTML for the page instantly, but the requests for
the external resources seem to take forever.
If I look at the CPU usage in Activity Monitor, 'Google Chrome Renderer' uses 100% CPU when loading from the href, but only 30% when loading directly from the page.
I'm using the latest version of Chrome (22.0.1229.94)
So - my question
Is there a way to programatically disable "Predict network actions to improve page load performance"?
Or is there some other solution to this problem?
Just going through high voted unanswered questions I came across this one, and I once got into a similar situation for entirely different reasons (chrome was preloading a huge file I couldn't afford to load for every user). The fairly simple solution I applied back then was to open the link through Javascript rather than a simple href which worked wonders. Either way, your problem might already be solved, but seeing the number of views I thought I could at least share this small insight.

HTML 5 Offline Application, not working after disconnected internet

How can i create a html 5 page that still works even if internet being disconnected and user press REFRESH (F5) on the browser.
I am referring to this http://html5demos.com/offline page,
it will show Offline when i disconnected my internet, but when i press refresh on browser, it is not working anymore and show page not found.
I want my page to work 100% offline even if user press refresh on browser.
If you want to create an 'offline' HTML5 web application, for example by using androids webview, i would suggest using something like phonegap this will allow you to create web applications while not necessarily being connected to the internet. As far as the html5demos go... im not sure what you are trying to get at...
-hope this helps