phpknight Posted December 23, 2007 Share Posted December 23, 2007 I don't normally use redirects, but I have a page that redirects users who land at certain pages after three seconds. It works just fine. However, if I click the reload button on the browser before the redirect occurs (like after a second or two) then the redirect no longer happens at all. Why is this the case? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 23, 2007 Share Posted December 23, 2007 what are you using to redirect - meta or javascript or server side language (php, asp, jsp, etc.)? Quote Link to comment Share on other sites More sharing options...
phpknight Posted December 24, 2007 Author Share Posted December 24, 2007 I was using meta, but I suppose I could use PHP as well. Would that work better? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 24, 2007 Share Posted December 24, 2007 Either will work if you have your script set-up the right way. I would use PHP; just to avoid the slight chance that end user does not have js or metas enabled on their browser. Plus that way you can validate the PHP global variable "$_SERVER"; too check for specific pages that you want to be redirect to/from. Quote Link to comment Share on other sites More sharing options...
phpknight Posted December 24, 2007 Author Share Posted December 24, 2007 Okay. But what about my original issue? If I hit reload on the page before the three seconds expires, it never redirects after that. Is that normal? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 24, 2007 Share Posted December 24, 2007 I don't know how your using your code - but if you use the below meta; then it should work fine. <meta http-equiv="refresh" content="3;url=http://www.google.com"> You can reload the page as many times as you want; if you allow the page to not be reloaded for 3 seconds; the meta will redirect. Quote Link to comment Share on other sites More sharing options...
phpknight Posted December 25, 2007 Author Share Posted December 25, 2007 Hi, That is what I have. It is not lowercase, but that is exactly what I am doing. Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 25, 2007 Share Posted December 25, 2007 then your page will redirect to the meta's url; even if you reload it. maybe your browser has meta tags turned off. that is the only reason I could see for your meta not redirecting. it probably has to do with how your validating the landing page. post your full code and I will take a look at it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.