|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
CFLOCATION mechanism ?
Hoping someone can shed some light on the underlying mechanism thatDavid K 06/02/03 02:10 P <CFLOCATION> is a redirect from the server side. Nothing on the client takesJohn Wilker 06/02/03 02:13 P No, it is not actually, is completely client side.David K 06/02/03 02:24 P > Hoping someone can shed some light on the underlyingDave Watts 06/02/03 02:16 P > When you use CFLOCATION, it's creating an HTTP response header which looksDavid K 06/02/03 02:28 P David K wrote:Jochem van Dieten 06/02/03 02:32 P DOH!David K 06/02/03 02:41 P >> It's then up to your browser to request the other URL.John Wilker 06/02/03 02:19 P Incorrect.ksuh 06/02/03 02:23 P some interesting info on the meta tag and the http-equiv attributeDouglas.Knudsen 06/02/03 02:37 P Hoping someone can shed some light on the underlying mechanism that CFLOCATION uses to perform the re-direct. My current understanding is that it simply returns a header to the browser for a client side re-direct. However, I was testing to see if setting IE's "Allow META Refresh" to "DISABLE" would break CFLOCATION and I was surprised to see that it *did not*. It did however break <cfheader name="refresh" value="0; URL=foo.cfm"> which makes sense. What's going on here? --David K. <CFLOCATION> is a redirect from the server side. Nothing on the client takes place. That's why setting cookies on pages that have CFLOCATION doesn't work. It gets processed by the server and the server sends a new page to the browser. J Hoping someone can shed some light on the underlying mechanism that CFLOCATION uses to perform the re-direct. My current understanding is that it simply returns a header to the browser for a client side re-direct. However, I was testing to see if setting IE's "Allow META Refresh" to "DISABLE" would break CFLOCATION and I was surprised to see that it *did not*. It did however break <cfheader name="refresh" value="0; URL=foo.cfm"> which makes sense. What's going on here? --David K. No, it is not actually, is completely client side. CFMX can do serverside re-deirects though. Search through this list to find out how. > <CFLOCATION> is a redirect from the server side. Nothing on the client takes > place. That's why setting cookies on pages that have CFLOCATION doesn't > work. It gets processed by the server and the server sends a new page to the ----- Excess quoted text cut - see Original Post for more ----- URL=foo.cfm"> > which makes sense. What's going on here? > > --David K. ----- Excess quoted text cut - see Original Post for more ----- When you use CFLOCATION, it's creating an HTTP response header which looks a little like this: HTTP/1.1 302 Object Moved Location: someotherfile.html ... It's then up to your browser to request the other URL. A "META refresh", on the other hand, is an instruction embedded within an HTML page, using the META tag, which is something else entirely. An HTML author can't force the web server to return specific HTTP headers, and the META tag can be used to provide similar functionality. I'm kind of surprised that IE's setting stopped the CFHEADER tag from working, since that's a real HTTP response header, rather than a META tag, but it's not like there aren't any other bugs in IE, so I'm not too surprised. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 > When you use CFLOCATION, it's creating an HTTP response header which looks a > little like this: > > HTTP/1.1 302 Object Moved > Location: someotherfile.html > ... > > It's then up to your browser to request the other URL. Thanks, that makes sense. > A "META refresh", on the other hand, is an instruction embedded within an > HTML page, using the META tag, which is something else entirely. An HTML > author can't force the web server to return specific HTTP headers, and the > META tag can be used to provide similar functionality. I'm kind of surprised > that IE's setting stopped the CFHEADER tag from working, since that's a real > HTTP response header, rather than a META tag, but it's not like there aren't > any other bugs in IE, so I'm not too surprised. > While we're at it here, what's the response header that gets returned with <cfheader name="refresh" value="0; URL=foo.cfm"> ? --David K. David K wrote: > > While we're at it here, what's the response header that gets returned with > <cfheader name="refresh" value="0; URL=foo.cfm"> ? Refresh: 0; URL=foo.cfm Jochem DOH! > David K wrote: > > > > While we're at it here, what's the response header that gets returned with ----- Excess quoted text cut - see Original Post for more ----- >> It's then up to your browser to request the other URL. Oh I didn't even know that. Cool. :) ----- Excess quoted text cut - see Original Post for more ----- When you use CFLOCATION, it's creating an HTTP response header which looks a little like this: HTTP/1.1 302 Object Moved Location: someotherfile.html ... It's then up to your browser to request the other URL. A "META refresh", on the other hand, is an instruction embedded within an HTML page, using the META tag, which is something else entirely. An HTML author can't force the web server to return specific HTTP headers, and the META tag can be used to provide similar functionality. I'm kind of surprised that IE's setting stopped the CFHEADER tag from working, since that's a real HTTP response header, rather than a META tag, but it's not like there aren't any other bugs in IE, so I'm not too surprised. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 Incorrect. The client is sent a 302 status code - page moved. > <CFLOCATION> is a redirect from the server side. Nothing on the > client takes > place. That's why setting cookies on pages that have CFLOCATION > doesn'twork This doesn't work because there's a bug in CF that was finally fixed in MX (it only took, oh, 6 years). It gets processed by the server and the server sends ----- Excess quoted text cut - see Original Post for more ----- some interesting info on the meta tag and the http-equiv attribute http://www.wdvl.com/Authoring/HTML/Head/Meta/HTTP.html http://vancouver-webpages.com/META/metatags.detail.html http://ftp.ics.uci.edu/pub/ietf/html/draft-musella-html-metatag-01.txt from the above....note the word 'can'. In other sources the word can is replaced with 'may'. "HTTP servers can read the contents of the document head to generate response headers corresponding to any elements defining a value for the attribute HTTP-EQUIV." ...a paraphrased response to the JS-Jive list... Doug ----- Excess quoted text cut - see Original Post for more -----
|
March 22, 2010
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||