Prerender cancels on POST request?

65 views
Skip to first unread message

gree...@gmail.com

unread,
Apr 27, 2017, 1:06:10 PM4/27/17
to Prerender
In the design doc, https://www.chromium.org/developers/design-documents/prerender, I see contradicting information as to when the prerendering cancels, especially in the case of xhr POST request. Does prerendering cancel when there is a xhr POST request? Or does it just not send? 

Matt Menke

unread,
Apr 27, 2017, 1:08:49 PM4/27/17
to gree...@gmail.com, Prerender
I'm not seeing any contradictory claims.  Could you point them out to me?

PhistucK

unread,
Apr 27, 2017, 1:10:39 PM4/27/17
to gree...@gmail.com, Prerender
Note that prerendering will be disabled for 99% (on its way to a complete removal) of the users in Chrome 58 anyway, so it might not be relevant anymore anyhow. :(


PhistucK

On Thu, Apr 27, 2017 at 8:06 PM, <gree...@gmail.com> wrote:
In the design doc, https://www.chromium.org/developers/design-documents/prerender, I see contradicting information as to when the prerendering cancels, especially in the case of xhr POST request. Does prerendering cancel when there is a xhr POST request? Or does it just not send? 

--
You received this message because you are subscribed to the Google Groups "Prerender" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prerender+unsubscribe@chromium.org.

Greeshma Yellareddy

unread,
Apr 27, 2017, 1:18:29 PM4/27/17
to Matt Menke, Prerender
While not very obvious, the cancellation reasons in one case does not include POST, in the other case, it does.

Cancellation on Corner Cases

Pages are canceled if any of the conditions happen:
  • ...
  • A request is issued which is not a GET, HEAD, POST, OPTIONS, or TRACE.

Minimizing server side effects

Prerendering is only triggered when the top level page is retrieved with a GET, and is assumed to be idempotent. Additionally, any non-GET, HEAD, or OPTION requests from XmlHttpRequests will not be sent over the network and the page will be cancelled.


Matt Menke

unread,
Apr 27, 2017, 1:21:37 PM4/27/17
to Greeshma Yellareddy, Prerender
You're right, I was misreading that as cancelling on POST.  Hrm, looks like we do let POSTS through.

PhistucK

unread,
Apr 27, 2017, 1:31:29 PM4/27/17
to Matt Menke, Greeshma Yellareddy, Prerender
The second section that was mentioned mentions "OPTION" instead of "OPTIONS" - is that intended?


PhistucK

Greeshma Yellareddy

unread,
Apr 27, 2017, 1:35:41 PM4/27/17
to Matt Menke, Prerender
Thanks for the response!! 
Isn't that a bug? 

I understand Chrome may be deprecating prerendering, but sending POST requests when prerendering can result in all kinds of spurious results.

Matt Menke

unread,
Apr 27, 2017, 1:38:01 PM4/27/17
to Greeshma Yellareddy, PhistucK, Prerender
That's actually expected behavior.  It was added because of the sheer number of sites that send uninteresting POSTS on navigation, without user input, as I recall.

PhistucK:  Thanks!  Fixed.

Greeshma Yellareddy

unread,
Apr 27, 2017, 1:46:04 PM4/27/17
to Matt Menke, PhistucK, Prerender
Thanks for the clarification
Reply all
Reply to author
Forward
0 new messages