Register to post in forums, or Log in to your existing account
 

Post new topic  Reply to topic     Home » Forums » Website or Forum problems
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Sun Oct 31, 2004 8:28 pm   

Site Problem
 
On any page which just forwards you to a different page (such as the root pages for zuggsoft.com and emobius.com) you should always include a text link to forward also. If you do not, then people who disable meta-refresh and/or javascript see nothing but a blank page. It looks like your server is down. You've probably seen it yourself... 'if your browser does not redirect you in a few seconds, click here'. That text is for just this situation, and should not be considered 'optional'.

Raven
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Sun Oct 31, 2004 8:33 pm   
 
Reason I posted: Browsing from work, all javascript/meta-refresh/etc is disabled for all sites. There should always be an alternative for limited-rights browsers, particularly since with Zeu... er, zApp and eMobius you're going for a more businesslike clientel, who are more likely to be browsing under similar restrictions.

I really did think Zuggsoft was down, until I checked the source code for the blank page.

Raven
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Nov 01, 2004 7:34 pm   
 
Actually, I hate sites that put the redirect link on their main page. When you go to http://www.zuggsoft.com/ I want the redirect to whatever home page I'm currently using to be transparent. I don't want to display any links.

And honestly, the main page on www.zuggsoft.com has been using redirect code for about 6 years now. And this is the first I have heard of anyone that had it disabled. Why in the world would you disable meta-refresh at work? I can understand Javascript and other things, but there isn't any security problem with the meta redirect. And so many sites use it, that I'm amazed you can do any work at all on the web without it.

I'm afraid I need to stick with the majority on this one. I don't want to annoy the majority of users who have redirect enabled just to satisfy some very small number that might have it turned off and not know about it. After all, if you have it turned off, then you are going to have so many problems with so many sites that getting a blank page for a site means it's not necessarily down, and as you said, you check to see if that is the case.
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Mon Nov 01, 2004 9:10 pm   
 
Well, you don't have to see the link. It appears for a split second... the same time the blank page displays. And no, I don't understand why they disable it either. :-) I've seen many sites (not yours) that use a javascript refresh... 'OnLoad' it sets the new URL. Those I don't understand at ALL... it's like they are deliberately trying to exclude non-javascript customers. :-)

But having a URL on the page... I don't see where that's an issue, since it will vanish as soon as it appears.
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Mon Nov 01, 2004 9:10 pm   
 
If you preferred, you could even set the font color to soft gray, so it's not even noticable unless the page doesn't refresh itself.
Reply with quote
Rainchild
Wizard


Joined: 10 Oct 2000
Posts: 1551
Location: Australia

PostPosted: Tue Nov 02, 2004 12:19 am   
 
Think there's a way to redirect using PHP as well, I'll look it up when I'm at work tomorrow.
Reply with quote
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Tue Nov 02, 2004 5:04 am   
 
Code:
 <?
$URL="http://www.emobius.comt";
header ("Location: $URL");
?>
Your html code down here
_________________
Evangelist/Corsant/Rowick
telnet://phidar.com:9000
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Nov 02, 2004 5:35 am   
 
Yes, you can definitely redirect with PHP and that's great. On the old Windows NT site it was giving ASP pages priority. With the new site I'll try putting an index.php in the main directory and redirect from there and see if it works better.

But I've got a question for the web experts...is the PHP redirect safe for Google searches? In other words, do all of the search engines pass through the redirect and index the final page correctly? I know that was one reason for sticking with plain HTML in the past.
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Tue Nov 02, 2004 4:29 pm   
 
All the search engines I'm aware of understand all proper forms of redirecting. Proper does not include JavaScript redirects. However, I am not really THAT aware of many search engines... two, to be precise. So it's probably safer to stick to HTML. Of course, *cough* having a visible text link would make even the stupidest engine able to follow it. *uncough* :-)
Reply with quote
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Tue Nov 02, 2004 8:51 pm   
 
The thing I posted is google safe :)
_________________
Evangelist/Corsant/Rowick
telnet://phidar.com:9000
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Tue Nov 02, 2004 10:01 pm   
 
I believe the code you pasted creates an HTTP header giving (If I recall) an HTTP redirect error. The codes fail me... in the 200s I think? But every browser and every search engine I am aware of respect server headers. However... if that is correct, then no HTML can follow that header, because the page would never be seen, and thus the HTML is irrelevant. I recommend you check the language details for that.

If it is not a server directive, then it is just a shortcut for a META refresh, or some other snippet of HTML code that you could do yourself. I don't trust code to create my HTML for me unless I can see and dissect the created code to make sure it is good enough.
Reply with quote
Rainchild
Wizard


Joined: 10 Oct 2000
Posts: 1551
Location: Australia

PostPosted: Tue Nov 02, 2004 10:21 pm   
 
http://www.php.net/header

The second special case is the "Location:" header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless some 3xx status code has already been set.

Code:

<?php
header("Location: http://www.example.com/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Tue Nov 02, 2004 10:29 pm   
 
Right. And, as that code snippet implies, nothing below that header should get executed. So your initial example that includes 'Your HTML goes here' is not correct... nothing should follow that directive, it is the end of the page, nothing after it is relevant.
Reply with quote
Rainchild
Wizard


Joined: 10 Oct 2000
Posts: 1551
Location: Australia

PostPosted: Tue Nov 02, 2004 10:54 pm   
 
Well, wasn't my example, but yeah :P

People say that 302 redirects are handled fine by google, so one can only imagine that most search engines will be ok by that.
Reply with quote
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Tue Nov 02, 2004 11:13 pm   
 
Code:
<?
header("Location: http://www.emobius.com");
?>


Was something wrong with syntax in the previous one I think. I got errors too, lol.

I thought it would execute html after the php code if you did not have exit; added, but I could be wrong. I never actually tested to see if the html displayed or not.

www.ljlinkshell.com/redirect.php will take you to emobius
_________________
Evangelist/Corsant/Rowick
telnet://phidar.com:9000
Reply with quote
The Raven
Magician


Joined: 13 Oct 2000
Posts: 463

PostPosted: Tue Nov 02, 2004 11:40 pm   
 
It WILL execute the code, and the server will have to do the work of processing it... but the browser will never see it. That is why you are supposed to put the exit; command there, to force the page to halt. The only reason you may put additional code is for things that the user will not see, such as if you insert some database strings, or set some session variables. However, to maintain code clarity, I always put stuff like that BEFORE the redirect command, so that I can be sure code halts right afterwards and I'm not wasting server cycles.
Reply with quote
Evangelist
Adept


Joined: 10 Oct 2000
Posts: 224
Location: USA

PostPosted: Wed Nov 03, 2004 12:06 am   
 
So I was right but my syntax was wrong, lol.

Anyway, hope it helped zugg out some
_________________
Evangelist/Corsant/Rowick
telnet://phidar.com:9000
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Website or Forum problems All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net