by eloff · 10y ago · 0 comments
The immutable solution is cleaner, and doesn't load the server as much, but it's not backward compatible and requires the people who run the server to know what they're doing. Maybe the two solutions could be combined?
The biggest potential drawback I see is that maybe most resources, including the html don't expire, so every page will be rendered and re-rendered. Giving little benefit and making the rendering choppier. Some of that maybe could be mitigated by starting the rendering in the background and not displaying it until a certain percentage of requests return, or special casing the "page" itself as opposed to page resources.
Original script:
<script>
location.href="http://google.com";
</script>
New script <script>
// oops! forgot to remove this
// location.href="http://google.com";
</script>
You'll want to make sure you have the right version in place before you try to run either of them.Images would be safe.
Or an alternate plan, start rendering, but do not run the javascript until the resource checks for css+js files return. It would slow things down some more, but not as much as waiting for everything.