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: 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; '': 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 --Apple-Mail=_87ED4B56-A3FD-4EC7-86B3-7DB30668B625 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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:///admin/updatecaches So if I = start typing http:///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:///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 ----------------------------------------------- --Apple-Mail=_87ED4B56-A3FD-4EC7-86B3-7DB30668B625 Content-Type: multipart/mixed; boundary="Apple-Mail=_92A2CF15-201F-4DC4-95C2-C5F2DA3BAC74" --Apple-Mail=_92A2CF15-201F-4DC4-95C2-C5F2DA3BAC74 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii 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
-----------------------------------------------
<= div style=3D"margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: = 'Times New Roman', serif;">

= --Apple-Mail=_92A2CF15-201F-4DC4-95C2-C5F2DA3BAC74 Content-Disposition: attachment; filename="Israel Brewster.vcf" Content-Type: text/directory; name="Israel Brewster.vcf" Content-Transfer-Encoding: quoted-printable BEGIN:VCARD=0D=0AVERSION:3.0=0D=0AN:Brewster;Israel;;;=0D=0AFN:Israel=20= Brewster=0D=0AORG:Frontier=20Flying=20Service;MIS=0D=0ATITLE:PC=20= Support=20Tech=20II=0D=0A= EMAIL;type=3DINTERNET;type=3DWORK;type=3Dpref:israel@frontierflying.com=0D= =0ATEL;type=3DWORK;type=3Dpref:907-450-7293=0D=0A= item1.ADR;type=3DWORK;type=3Dpref:;;5245=20Airport=20Industrial=20= Wy;Fairbanks;AK;99701;=0D=0Aitem1.X-ABADR:us=0D=0ACATEGORIES:General=0D=0A= X-ABUID:36305438-95EA-4410-91AB-45D16CABCDDC\:ABPerson=0D=0AEND:VCARD=0D=0A= --Apple-Mail=_92A2CF15-201F-4DC4-95C2-C5F2DA3BAC74 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii

--Apple-Mail=_92A2CF15-201F-4DC4-95C2-C5F2DA3BAC74-- --Apple-Mail=_87ED4B56-A3FD-4EC7-86B3-7DB30668B625--