Jump to content

Recommended Posts

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

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

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.