[chromium-dev] Re: How does chromium handle 'Back' functionality

2009-06-01 Thread Darin Fisher
On Mon, Jun 1, 2009 at 11:19 PM, Peter Kasting wrote:

> On Mon, Jun 1, 2009 at 11:10 PM, Lucius Fox wrote:
>
>> 1. If I enter some values in form elements, and then load a new page
>> (before i clicked submit) , and the click back. Does that mean the
>> values I entered in each form element will be all gone? (since
>> chromium does not keep track)?
>
>
> Why don't you test it?  You'll learn more and remember better.
>

We should restore form values just like other browsers.  If we do not, then
it is a bug.



>
> 2. Does chromium cache JavaScript native code (since it compiles JS
>> files to native code)?
>
>
> Not generally, to my knowledge.
>

V8 does have a cache for compiled scripts!




>
> 3. What about JavaScript context (e.g. values of
>> JavaScript can changed due to user interaction) of that page, Does it
>> save in memory too?
>>
>
> Again, why don't you test it?  This is pretty easy to test too.
>

This is not saved.  Other browsers only save this information sometimes as a
side-effect of navigating back to a page that still exists in the page
cache.  You cannot rely on a back navigation hitting the page cache in any
browser since the page cache is finite in size.

-Darin

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium handle 'Back' functionality

2009-06-01 Thread Peter Kasting
On Mon, Jun 1, 2009 at 11:10 PM, Lucius Fox  wrote:

> 1. If I enter some values in form elements, and then load a new page
> (before i clicked submit) , and the click back. Does that mean the
> values I entered in each form element will be all gone? (since
> chromium does not keep track)?


Why don't you test it?  You'll learn more and remember better.

2. Does chromium cache JavaScript native code (since it compiles JS
> files to native code)?


Not generally, to my knowledge.

3. What about JavaScript context (e.g. values of
> JavaScript can changed due to user interaction) of that page, Does it
> save in memory too?


Again, why don't you test it?  This is pretty easy to test too.

PK

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium handle 'Back' functionality

2009-06-01 Thread Lucius Fox

On Mon, Jun 1, 2009 at 11:00 PM, Peter Kasting  wrote:
> On Mon, Jun 1, 2009 at 10:57 PM, Lucius Fox  wrote:
>>
>> what do you mean when you said "cached content should always be
>> preferred even if it is stale"?
>
> If the resource is in the cache, it is used, regardless of whether it has
> expired.
>>
>> Does Chrome still issue HTTP requests and check if the cache control
>> of HTTP response before it pull the data from content cache?
>
> No.
>>
>> Or how is navigating back different from load 1 page, kill the browser
>> (assume the page content is now saved in cache) and start the browser
>> again and reload the same page?
>
> In this case the browser will do a network transaction for resources in the
> cache which have expired.

Thank you.  Sorry 3 more questions:

1. If I enter some values in form elements, and then load a new page
(before i clicked submit) , and the click back. Does that mean the
values I entered in each form element will be all gone? (since
chromium does not keep track)?

2. Does chromium cache JavaScript native code (since it compiles JS
files to native code)? When users load a new page and then hit back,
does chromium just use already compiled native code (instead of
compiling it from JS files again)?

3. "page cache, which holds the DOM of recently visited pages in a
frozen state". What about JavaScript context (e.g. values of
JavaScript can changed due to user interaction) of that page, Does it
save in memory too?
What about CSS properties values? Are those holding in memory as well?


> PK

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium handle 'Back' functionality

2009-06-01 Thread Peter Kasting
On Mon, Jun 1, 2009 at 10:57 PM, Lucius Fox  wrote:

> what do you mean when you said "cached content should always be
> preferred even if it is stale"?


If the resource is in the cache, it is used, regardless of whether it has
expired.

Does Chrome still issue HTTP requests and check if the cache control
> of HTTP response before it pull the data from content cache?


No.

Or how is navigating back different from load 1 page, kill the browser
> (assume the page content is now saved in cache) and start the browser
> again and reload the same page?


In this case the browser will do a network transaction for resources in the
cache which have expired.

PK

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium handle 'Back' functionality

2009-06-01 Thread Lucius Fox

On Mon, Jun 1, 2009 at 10:50 PM, Darin Fisher  wrote:
> When navigating back, we reload the page.  However, we set a flag to
> indicate that cached content should always be preferred even if it is stale.

Thank you.

But what do you mean when you said "cached content should always be
preferred even if it is stale"?
Does Chrome still issue HTTP requests and check if the cache control
of HTTP response before it pull the data from content cache?  If yes,
how is that 'flag' change anything?

Or how is navigating back different from load 1 page, kill the browser
(assume the page content is now saved in cache) and start the browser
again and reload the same page?




> That is consistent with all other major browsers with one
> exception:  some of the other major browsers implement a page cache, which holds the DOM of
> recently visited pages in a frozen state so that they can be quickly
> restored when navigating back or forward.  Such browsers behave similarly to
> Chrome when the page you are navigating back to is not found in the page
> cache.
> -Darin
>
>
> On Mon, Jun 1, 2009 at 2:23 PM, Lucius Fox  wrote:
>>
>> Hi,
>>
>> Lets say i have 1 tab and I load 3 sites.
>> 1. www.cnn.com
>> 2. www.yahoo.com
>> 3. www.aol.com  <-- the current page
>>
>> What happens when users click 'Back'?
>> does chromium keep www.yahoo.com/www.cnn.com in memory? if yes, how
>> many pages it can keep in memory?
>> Or chromium just reload the page from scratch ? (just like user type
>> 'www.yahoo.com' again in the URL box? (and it appears faster since
>> some files (e.g. images/js files) are already in cache?
>>
>> Thank you for any explanation.
>>
>> >>
>
>

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: How does chromium handle 'Back' functionality

2009-06-01 Thread Darin Fisher
When navigating back, we reload the page.  However, we set a flag to
indicate that cached content should always be preferred even if it is stale.
That is consistent with all other major browsers with one
exception:  some of the other major browsers implement a page cache,
which holds the DOM of
recently visited pages in a frozen state so that they can be quickly
restored when navigating back or forward.  Such browsers behave similarly to
Chrome when the page you are navigating back to is not found in the page
cache.

-Darin



On Mon, Jun 1, 2009 at 2:23 PM, Lucius Fox  wrote:

>
> Hi,
>
> Lets say i have 1 tab and I load 3 sites.
> 1. www.cnn.com
> 2. www.yahoo.com
> 3. www.aol.com  <-- the current page
>
> What happens when users click 'Back'?
> does chromium keep www.yahoo.com/www.cnn.com in memory? if yes, how
> many pages it can keep in memory?
> Or chromium just reload the page from scratch ? (just like user type
> 'www.yahoo.com' again in the URL box? (and it appears faster since
> some files (e.g. images/js files) are already in cache?
>
> Thank you for any explanation.
>
> >
>

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---