Kristi Kirk Trent
Kristi Kirk Trent

Reputation: 11

How do I fix multiple redirects to my mobile site on Blogger?

One of the numerous suggestions made by Google Page Speed Insights regarding my slow as yuck website is:

Avoid multiple redirects. Redirects introduce additional delays before the page can be loaded. Learn more. URL Time Spent (Initial: http://okc-craigslist.blogspot.com/) 0 ms /?m=1(okc-craigslist.blogspot.com) 630 ms /?m=1(okc-craigslist.blogspot.com) 180 ms

Can someone tell me what this means exactly? I don't know why I would be redirecting twice to the mobile version of my website. How do I fix this?

Help!

Upvotes: 1

Views: 2904

Answers (2)

Blogger Expert
Blogger Expert

Reputation: 1

To Avoid multiple page redirection for Following Steps : Go to "Edit HTML" of your blog/blogger.com or website.

Add below code just after tag of your blog:

<script type='text/javascript'>//<![CDATA[
var curl = window.location.href;if (curl.indexOf('m=1') != -1) {curl = curl.replace('m=1', 'm=0');window.location.href = curl;}
//]]></script>

and Save it . it will works fine here is Demo website that it works fine on blogger

Upvotes: 0

Josh Lee
Josh Lee

Reputation: 177594

If you mouse over the two links in the PageSpeed output, you can see that the first starts with http://, and the second https://. The first redirect changes the query string, and the second the scheme.

Ideally the first redirect would send you to both HTTPS and mobile version of the site, but that might not be possible for you to control.

Perhaps Blogger can turn on HSTS? That will teach the user's browser to apply the http→https redirect to the entire site.

Upvotes: 1

Related Questions