[Webkit-unassigned] [Bug 30862] Dynamically inserted subresources aren't revalidated even when the containing document is reloaded
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 3 10:01:56 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=30862
--- Comment #41 from Alexander Romanovich <alex at sirensclef.com> 2011-02-03 10:01:55 PST ---
(In reply to comment #39)
> I've heard several times in this thread that it simply can't be done without losing an important User-Experience optimization, but I haven't seen a single actual explanation of that techinical limitation.
> If a *user* says, "I want to refresh this page because things seem to not be working correctly" (or) "I want to refresh this page because the support forums/representatives of the site told me to", in what use-case(s) are we saying that this use would actually only want some of the resources on that page re-validated, and not others?
Because by permanently forcing all future resources to be revalidated, you are thereby sacrificing one goal of caching which is that the server should not be contacted at all until the resource is set to expire. It would be a problem to indefinitely contact the server to revalidate every single resource over the entire lifetime the JS application runs. There has to be some point at which the automatic revalidation ends. We either need the browser to revalidate resources that are immediately loaded by the application (the refresh idea), or give the developer a way to revalidate them themselves (better, in my opinion).
> I'm quite confused by the alternate suggestion. How is a dynamic script loader (like mine, LABjs), supposed to:
>
> 1. detect that a "refresh" of a page-view is happening; AND
> 2. somehow manually force all the resources I'm going to ask for to be re-validated
>
> Adding a ?x=128945839853 type cache-buster to all the URLs is not what we want, because we don't want a full reload, we want the browser to re-validate (an If-Modified-Since request).
Kyle, I think we're saying the same thing here. What I am saying is that there is *not* currently a way to do #1 and #2, and that it would be useful to have that ability. I also believe a query string is not a valid solution. I'd love for LABjs to be able to detect that the page was refreshed and then be able to force a refresh for particular resources it loads later.
> Are we suggesting that every resource container expose some property that indicates whether or not the resource it contains is subject to re-validation or not? Because I'd of course only want to force my own re-validation on resources in which the browser wouldn't already be inclined to re-validate.
> Also, keep in mind there are various ways that resources are loaded, from XHR to dynamic script/link tags, to iframes, <object>s, <img>s, etc. If the suggestion is that we create a mechanism by which a web author (ie, me, as a script loader author) can force a re-validation, it has to take into account all those possible request methods.
This is the reason I suggested toggling a revalidation mode on/off that would encompass any requests (from any of the methods you listed) while the revalidation mode is on.
> Perhaps a `rel` attribute can be added to a resource request that is like `rel="alwaysRevalidate"` or something like that?
A rel attribute does not cover most methods by which the resource is loaded.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list