So after much help and research I've FINALLY been able to get the 301 redirects working via .htaccess file, but I noticed that unless I actually hit 'refresh' on my browser it will not redirect the page due to simply reading the cached site.

I've tried closing all browsers, inserting the .htaccess file, and THEN opening a new browser, but it still opens the cached site. I would hazard a guess that most customers will not bother refreshing a page, and if they do not, this will take quite a while to discover that there is indeed a new page!

Any ideas? Thanks!

-Karl

EDIT: I just had the idea of putting a link on our current homepage that says, "Click here to see our new website!" and the link will refresh the page, which will in turn kick the 301 redirect into action. Can anyone think of any negative side-effects of this?

  • I have a feeling that this question would be better served on stackoverflow.com. Anyway, can you post a link to the site? TailorDMI about 7 years ago
  • The site currently I have the 301 redirects offline until everything is good to go. I'm more doing advanced research into problems I may have in the near future when the time comes to go live. Karl Stelter about 7 years ago

2 answers

1
point

I think you're running into a bit of a catch-22 here, as you can't add anything to the page to force the user's browser to refresh if they don't have the version of the page containing the "refresh" instruction.

Browsers do periodically check for newer versions of cached content. So by editing the home page at least it should have updated the timestamp, and your users should get the updated version of the site eventually.

I don't know that the link is necessary though, even just updating the page content slightly should eventually trigger a refresh. Again, this is because users that have a cached version of the site wouldn't see the link anyway.

Answered about 7 years ago by Clay Hinson
  • If I update the homepage to have that link though, wouldn't that count as an updated timestamp? Also, I'm still a little concerned about the link that forces a refresh on the customers page in terms of search engines. I've heard that this is not good practice but I want to confirm one way or the other. Karl Stelter about 7 years ago
  • Yes, updating to have the link would count as an updated timestamp, but if the point of getting the updated page is to 301 redirect, they'd never see the link anyway. Regarding search engines, if you're going to have a redirect, a 301 is the way to go. It tells the search engine that the page it's crawling has moved, and it'll update its index to the new location. Clay Hinson about 7 years ago
Rob 230
-2
points

Did you try clearing your cache in your browser?

Answered about 7 years ago by Rob
  • I'm not really too worried about my own browser (I understand the basics of caching and why pages will or won't show new things), I'm worried about my customers. Karl Stelter about 7 years ago