Auto refresh a cached html - html

How can i auto refresh a cached html. i load a html submit and do some stuff and then close the browser and opens the browser which loads the cached html but it does not refresh..

I'm not quite sure on what you're getting at, but a cached HTML page is a snapshot of a page at a point in time. This means that if you are looking for an update from a webmaster or something like that by refreshing the page, you would be best to visit the actual page as a cached page doesn't change with the server's version of it.

Related

are images loaded once in html then available for subsequent requests?

If I've loaded an image into an html page, when I load it a second time further down in that page will it be instantly available?
Depends on the headers sent with the image, but I believe most browsers will cache images automatically. That should work fine as long as the URL is the same. Check the network request to make sure the image is only being requested once from the server.

does html5 appcache cause the page to load slower?

The files listed in the .mf file are the same files i am trying to load when the page first runs. Does having a manifest attribute defer processing of the rest of the document until the appcache loads?
No. On the very first load the cache gets built in the background, using the same files that where just downloaded, provided they have proper cache settings. E.g. If you have foo.css with long cache headers in your HTML page and the manifest, the browser will:
Load and render the page.
Look at the manifest.
Load foo.css from browser cache to appcache.
BUT: Appcache will however result in a FOUC (brief white page on reload), even if online and the page/app was made well enough so far to show smooth reloads.
With AppCache, the browser loads the document and its associated resources directly from the cache, without accessing the network, so this should load just as fast if not faster.

Loading same AppCache - based url won't work on firefox and safari

I have an html that is AppCached. I load it on the safari/firefox and everything's fine.
then, I paste the same url and hitting enter in my keyboard, nothing happens (in Chrome it performs a reload).
The reason I'm interested in this scenario, is that I'm actually using URLs with hashtags, and I'm pasting the same URL, the hashtag is different and I wish the page to reload (this is the common use case in mobile when you click on links from email and such).
Can anyone explain why the browser won't reload?
If you want the page to refresh then you can't use hashtags, the whole point of hashtags is not to refresh the page when changing the URL. It sounds like what you need to do is listen to the hashchange event instead of doing it all in the load event.

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 written in vi not updating in browser

I've been writing a webpage in vi and suddenly any changes I make are not updating when I go to the webpage in firefox. the page still loads, but not with my edits. very confused..
As a summary of the above comments:
This has nothing to do with vi. Options to refresh your browser and clear the cache are:
Ctrl+F5 to fully refresh your page
Ctrl+Shift+Del to delete the cache
Manually clear the cache in the browser settings