Forum Moderators: open

Message Too Old, No Replies

Does 301 and 302 redirects cause the browser to automatically refresh?

Or can you place content on the page?

         

Clark

5:14 am on Sep 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm trying to figure out a good strategy about dynamic content. For example, vbulletin will accept
showthread.php?t=$threadid
showthread.php?p=$postid
etc...

I'd like to write some code to detect the url and if it's formatted properly, then fine, if not, display the content so the browser doesn't need to refresh, but still send a 302 header so the search engine knows the correct url to look @.

I've read tons of pages about 301 and 302, but none of them went into the technical detail as to whether the header is the only thing to show on the page or if that's just a code that the browser ignores in the case of 302 or 301?

[edited by: Clark at 5:16 am (utc) on Sep. 3, 2006]

tedster

6:28 am on Sep 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The server uses the http header to tell the browser that the content for the requested url has moved. It also tells it what the new url is in that same header. So the browser doesn't get any content at the old url -- it just gets the http header and then requests the new url, as the server instructed.

[edited by: tedster at 6:41 pm (utc) on Sep. 4, 2006]

Clark

5:17 pm on Sep 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Tedster!