Mobile app version of vmapp.org
Login or Join
Kristi941

: Will previous 301 redirect still be cached if site switches to using SSL? For reasons only my past self knows I put a 301 redirect in place to force all traffic to example.org from www.example.org.

@Kristi941

Posted in: #301Redirect #Cache #Https #Redirects

For reasons only my past self knows I put a 301 redirect in place to force all traffic to example.org from example.org. Put simply it dropped the subdomain.

Now I would like to change it so that all traffic goes to the subdomain, which would be problematic as any cached 301s in user's browsers would send the user into a redirect loop.

So I am planning on buying an SSL certificate and encrypting all traffic on the site - for other reasons too. If I redirect the users to www.example.org/ will it still cause the browser to look at it's cache and go into a redirect loop again?

To my mind www.example.org is a different URL to www.example.org, but do all the browsers see it this way for caching purposes?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Kristi941

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kevin317

I need to double check the specifications, but I am pretty certain that cached objects depend on the request method.

So an object using HTTP would be a different cache entity from HTTPS.

So if you are redirecting to HTTPS, there should be no prior cache data.

Also, you may want to consider using lower cache periods and requiring validation prior to the change:

Cache-Control "max-age=3600, must-revalidate"

This should force the user agent to revalidate the content and pick up your changes faster - even if there's a caching issue.

Note that this is controlled on the client side, so various browsers/user-agents could behave differently.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme