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? Link to comment https://forums.phpfreaks.com/topic/82963-redirect-issue/ 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.)? Link to comment https://forums.phpfreaks.com/topic/82963-redirect-issue/#findComment-421976 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? Link to comment https://forums.phpfreaks.com/topic/82963-redirect-issue/#findComment-422277 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. Link to comment https://forums.phpfreaks.com/topic/82963-redirect-issue/#findComment-422307 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? Link to comment https://forums.phpfreaks.com/topic/82963-redirect-issue/#findComment-422400 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. Link to comment https://forums.phpfreaks.com/topic/82963-redirect-issue/#findComment-422593 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. Link to comment https://forums.phpfreaks.com/topic/82963-redirect-issue/#findComment-422939 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. Link to comment https://forums.phpfreaks.com/topic/82963-redirect-issue/#findComment-422964 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.