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


Groups > comp.lang.python > #81774

Cherrypy - prevent browser "prefetch"?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <israel@ravnalaska.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'causing': 0.04; '12px;': 0.05; 'cache': 0.07; 'needed,': 0.07; 'session.': 0.07; 'app,': 0.09; 'cherrypy': 0.09; 'http': 0.09; 'latter': 0.09; 'occasionally': 0.09; 'refresh': 0.09; 'subject:Cherrypy': 0.09; 'type,': 0.09; 'anyway': 0.14; 'random': 0.14; 'break-word;': 0.16; 'space;': 0.16; 'word-wrap:': 0.16; 'helvetica;': 0.16; 'prevent': 0.16; 'all,': 0.19; 'app': 0.19; 'trying': 0.19; 'server,': 0.19; 'typing': 0.19; 'admin': 0.22; '<div': 0.24; 'sends': 0.24; 'url:gt': 0.24; 'question': 0.24; 'least': 0.26; 'skip:" 20': 0.27; 'specifically': 0.29; 'rest': 0.29; 'skip:- 40': 0.29; '0);': 0.29; 'matching': 0.30; 'skip:( 20': 0.30; "i'm": 0.30; 'serve': 0.31; '(although': 0.31; 'flying': 0.31; 'request,': 0.31; 'running': 0.33; 'implemented': 0.33; 'rgb(0,': 0.33; 'actual': 0.34; 'could': 0.34; 'but': 0.35; 'there': 0.35; 'acceptable': 0.36; 'tech': 0.36; 'charset:us-ascii': 0.36; 'example,': 0.37; 'skip:- 20': 0.37; 'received:10': 0.37; 'auto;': 0.38; 'server': 0.38; 'question,': 0.38; 'to:addr:python-list': 0.38; 'skip:- 10': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'tell': 0.60; 'skip:t 30': 0.61; 'browser': 0.61; 'strictly': 0.61; 'header:Message-Id:1': 0.63; 'skip:n 10': 0.64; 'more': 0.64; 'between': 0.67; 'url:a': 0.72; 'received:12': 0.81; 'alaska': 0.84; 'skip:4 60': 0.84; 'url:admin': 0.84; 'url:auth': 0.84; '0px;">': 0.91; 'effects.': 0.91; 'serious': 0.97
X-Warning RFC compliance checks disabled due to whitelist
X-Warning Reverse-Path DNS check skipped due to whitelist
X-Warning Maximum message size check skipped due to whitelist
X-Warning Realtime Block Lists skipped due to whitelist
X-Warning System filters skipped due to whitelist
X-Warning Domain filters skipped due to whitelist
X-Warning User filters skipped due to whitelist
X-Warning Anti-Spam check skipped due to whitelist
X-Whitelist 2147483645
X-Envelope-From israel@ravnalaska.net
X-Envelope-To python-list@python.org
From Israel Brewster <israel@ravnalaska.net>
Content-Type multipart/alternative; boundary="Apple-Mail=_87ED4B56-A3FD-4EC7-86B3-7DB30668B625"
Subject Cherrypy - prevent browser "prefetch"?
Date Mon, 1 Dec 2014 11:28:42 -0900
To python-list@python.org
Mime-Version 1.0 (Mac OS X Mail 7.3 \(1878.6\))
X-Mailer Apple Mail (2.1878.6)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16468.1417465731.18130.python-list@python.org> (permalink)
Lines 152
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1417465731 news.xs4all.nl 2909 [2001:888:2000:d::a6]:57972
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:81774

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

I don't know if this is a cherrypy specific question (although it will be implemented in cherrypy for sure), or more of a general http protocol question, but when using cherrypy to serve a web app, is there anyway to prevent browser prefetch? I'm running to a problem, specifically from Safari on the Mac, where I start to type a URL, and Safari auto-fills the rest of a random URL matching what I started to type, and simultaneously sends a request for that URL to my server, occasionally causing unwanted effects.

For example, I have a URL on my Cherrypy app that updates some local caches. It is accessed at http://<server>/admin/updatecaches So if I start typing http://<server>/a, for example, safari may auto-fill the "dmin/updatecaches", and trigger a cache refresh on the server - even though I was just trying to get to the main admin page at /admin. Or, it might auto-fill "uth/logout" instead (http://<server>/auth/logout), and log me out of my session. While the former may be acceptable (after all, a cache update, even if not strictly needed, is at least non-harmfull), the latter could cause serious issues with usability. So how can cherrypy tell the difference between the "prefetch" and an actual request, and not respond to the prefetch?
-----------------------------------------------
Israel Brewster
Systems Analyst II
Ravn Alaska
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7293
-----------------------------------------------




Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Cherrypy - prevent browser "prefetch"? Israel Brewster <israel@ravnalaska.net> - 2014-12-01 11:28 -0900
  Re: Cherrypy - prevent browser "prefetch"? sohcahtoa82@gmail.com - 2014-12-01 12:41 -0800
  Re: Cherrypy - prevent browser "prefetch"? Nobody <nobody@nowhere.invalid> - 2014-12-02 21:05 +0000
    Re: Cherrypy - prevent browser "prefetch"? John Gordon <gordon@panix.com> - 2014-12-02 21:41 +0000
      Re: Cherrypy - prevent browser "prefetch"? Nobody <nobody@nowhere.invalid> - 2014-12-03 16:09 +0000

csiph-web