Re: Pre-fetch rough draft

2012-11-06 Thread Sergey Nikitin

On 05.11.2012, at 16:28, Julian Reschke wrote:

>> 
>> Yes. Exactly.
>> It's not about offline apps, it's about reducing loading time.
> 
> There's already the "prefetch" link relation that you could use.
> 

You need at least two pages to start prefetching.
And you can't prefetch anything for the first page.
If you have single page application you can't prefetch.

And it's not always possible for browser to visit a page (cookie/password 
protected).
 

>> Prefetch manifest is a way to tell browser what should be downloaded in 
>> advance.
>> So when user opens the site (for the first time) all resources 
>> (css/js/images/...) are already cached.
>> 
>> And if later site's resources are updated browser could check prefest 
>> manifest and
>> re-download all new resources in background. Before user visited site again.
> 
> But then you don't need a manifest for that (see above).
> 
> Best regards, Julian
> 
> 




Re: Pre-fetch rough draft

2012-11-08 Thread Sergey Nikitin

On 06.11.2012, at 12:49, Julian Reschke wrote:

> On 2012-11-06 09:28, Sergey Nikitin wrote:
>> 
>> On 05.11.2012, at 16:28, Julian Reschke wrote:
>> 
>>>> 
>>>> Yes. Exactly.
>>>> It's not about offline apps, it's about reducing loading time.
>>> 
>>> There's already the "prefetch" link relation that you could use.
>>> 
>> 
>> You need at least two pages to start prefetching.
> 
> Why two?
> 
>> And you can't prefetch anything for the first page.
> 
> Yes, you can. Just use the first page's metadata instead of a separate 
> prefetch manifest,
> 

I mean If you already downloaded a page you don't need any metadata. You can 
parse it and extract all urls from script/style tags (Ok. Except for a 
dynamically inserted ones).

>> If you have single page application you can't prefetch.
> 
> Why?
> 
>> And it's not always possible for browser to visit a page (cookie/password 
>> protected).
> 
> It's always possible to "visit" the page; it just needs to return the 
> relevant header fields.
> 

Maybe you never visited the page or your cookies are expired (or you logged 
out).

And visiting any page (with all cookies/other headers) is irreversible action. 
It affects statistics, it could do something without your knowledge (marking 
message as read in your webmail?). Yes I know about special header browser 
should send to a server, but I've never heard about any site supporting it.

Also generating a whole page just for metadata in it is a waste of server's CPU 
time.
 
-- 
Sergey Nikitin




Re: Pre-fetch rough draft

2012-11-08 Thread Sergey Nikitin

On 04.11.2012, at 2:10, Yehuda Katz wrote:

> Does this overlap with SPDY preloaded?
> 

I can't find anything about "SPDY preloaded".
Is it server push and server hint 
http://www.chromium.org/spdy/link-headers-and-server-hint
?

-- 
Sergey Nikitin