Any side effect on SEO or page rank if home page refreshes

I want to show different-sized images on various screen resolution devices, so I add some cookie functions in the home page html file’s head, i.e., if no cookie was set, a cookie will be created, in which the screen width will be saved, then refresh the home page. Thus the home page will show images based on the user’s screen width.

Because the home page will be refreshed or reloaded when a user visits the website for the first time, I want to know do search engines like the refresh action? Are there any disadvantages to the page rank or SEO? Thanks for help!

Following is the pseudo code.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Here is tile!</title>

Check http header to find is there a cookie in the client side using php function,
if no cookied found, create one and refresh the webpage using javascript functions. 

</head>
<body>

Perhaps you would be better off using the srcset attribute or the <picture> element for this. Or for background images use a media query.

1 Like

Thank you SamA74, the links you provided are useful.

Besides images, I could show different content based on the screen width which is saved in the cookie. The home page will be reloaded after the cookie is created. I am not sure is there any side effect on the SEO or page rank when the home page refreshes after a cookie is created, do seach engine like this behavior?. Thanks!

I’m not sure how much it will affect SEO, there will be an increase in server requests which will have a negative effect on page speed. Also consider UX, not just SEO. SEs help your customers find you, but the users are your customers.
There is no need to use cookies for any of this, it will only exclude anyone with cookies disabled.

Again you can do this easily with media queries, no need for cookies.

#headimg { background-image: url(../images/headerbig.jpg); }
.hidebig {display: none;}
@media screen and (max-width: 600px) {
    #headimg { background-image: url(../images/headersmall.jpg); }
    .hidesmall { display: none;}
    .hidebig { display: block;}
}

This is fine if the difference in content is minimal. If it’s most of the content, then you are looking at a whole separate mobile site, that’s another sotry.

Thank you SamA74!

The following links show different answers on landing page redirection, however, it is not landing page refresh.

http://webmasters.stackexchange.com/questions/23368/seo-penalty-for-landing-page-redirects

https://www.paradoxseo.com/avoid-landing-page-redirects-for-better-seo/

I don’t follow, what has redirects have to do with this?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.