Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81781 > unrolled thread

Re: Cherrypy - prevent browser "prefetch"?

Started byTim Chase <python.list@tim.thechases.com>
First post2014-12-01 16:12 -0600
Last post2014-12-01 16:12 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Cherrypy - prevent browser "prefetch"? Tim Chase <python.list@tim.thechases.com> - 2014-12-01 16:12 -0600

#81781 — Re: Cherrypy - prevent browser "prefetch"?

FromTim Chase <python.list@tim.thechases.com>
Date2014-12-01 16:12 -0600
SubjectRe: Cherrypy - prevent browser "prefetch"?
Message-ID<mailman.16473.1417471790.18130.python-list@python.org>
On 2014-12-01 16:50, Ned Batchelder wrote:
> On 12/1/14 4:26 PM, Tim Chase wrote:
>> All this to also say that performing non-idempotent actions on a
>> GET request is just begging for trouble. ;-)
> 
> This is the key point: your web application shouldn't be doing
> these kinds of actions in response to a GET request.  Make them
> POST requests, and Safari won't give you any trouble.

Though to be fair, based on the reading I did, Safari also pulls in
the various JS and executes it too, meaning that merely
(pre)"viewing" the page triggers any Google Analytics (or other
analytics) code you have on that page, sending "page views" with a
high bounce rate (looks like you only hit one page and never browsed
elsewhere on the site).

Additionally, if the target GET URL involves high processing load on
the server, it might be worthwhile to put a caching proxy in front of
it to serve (semi)stale data for any preview request rather than
impose additional load on the server just so a preview can be updated.

So I can see at least two cases in which you might want to sniff the
"are you just previewing, or do you actually want the page"
information.  Perhaps there are more.

-tkc


[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web