ehhh...got a question

Joined
Sep 30, 2003
Messages
1,270
Reaction score
10
Location
With u :)
well i just noticed that

the
Code:
<meta http-equiv="refresh" content=""

doesn't work on IE7 or was deprecated, well i was using this to redirect
to a page trough php after a login.

used a rather quick fix making use of js, just to make it work

Code:
<?php

echo "
<html>
<head>
<script LANGUAGE=\"JavaScript\">
function redirect()
{
window.location=\" http://" . $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']) . "/" . $page . "\"
}
</script>
</head>
<body onload=redirect()>
</body>
</html>";	
?>

well i'm kinda new to php and dunno much about security related to php or if theres any more standard way of doing this, enlight me with your knowledge plz :P is it ok like this or brings issues
 
If it's only IE7 with this problem, then you can assume you're doing it right. It's M$'s problem with their somehow "better" browser -.-

Meta refresh works in IE6, I just tested it.
It was left out of IE7 because it isn't in the newest HTML4.1 specifications anymore. It SHOULD be left out.

I know you hate microsoft, but they are right in doing so. I think FireFox 2 will show the same behaviour.
 
sage

That's just stupid. They're going to break 10+ years of web pages that way.
(I just tested Opera 8.51 and 9.0, works fine there.)

Perhaps they want to start over but what they didn't take into account is the fact that several million pages on the Internet were written using these older standards, and breaking old features just for the sake of doing so is incredibly lame.

That is why, unless there is a VERY GOOD REASON to do so, the best path of upgrading is to only add new features, retaining backwards compatibility. That's why the IBM PC was so successful.
 
I hate IE... every time i code a template and make my web site testing it with firefox its ok but when i test it with IE everything is screwd including the fonts... >.>
 
Re: sage

That's just stupid. They're going to break 10+ years of web pages that way
No they won't, because they thought of this and made this neat little thing called doctypes, so old websites are still rendered correctly. You know, the ones you suggested NOT USING in another thread? :wink:

Seriously, I'd prefer it if you stayed out of stuff like this where you don't seem to grasp the basic ideas behind the subject at hand.
 
No, it can be a relative URI as far as I know, at least google etc see this as a valid rewrite.

If you're concerned about that you can ofcourse always prefix your host, but as far as I know its not actually required (but then again, the HTTP specification is not something you'd learn by heart on a wet sunday afternoon, so feel free to proof me wrong here :wink:)
 
sage

Go look at the 2616 and see for yourself -.-
14.30 Location

The Location response-header field is used to redirect the recipient
to a location other than the Request-URI for completion of the
request or identification of a new resource. For 201 (Created)
responses, the Location is that of the new resource which was created
by the request. For 3xx responses, the location SHOULD indicate the
server's preferred URI for automatic redirection to the resource. The
field value consists of a single absolute URI.


Location = "Location" ":" absoluteURI

An example is:

Location: http://www.w3.org/pub/WWW/People.html
And I'm pretty sure what absoluteURI is, you can go look at 3986 if you don't believe me.
 
Back