-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All search results on Google (only mobile) now have "?no-cache=1" appended #9355
Comments
Anything that I can do to fix it quickly before I lose my Google ranking? |
I can see from Google web console that this is happening |
Only happens if you come from Google on a mobile. Works fine on desktop |
I think google somehow indexed most of my pages with ?no-cache and they started to replace my pages without ?no-cache because these rank better. If I'm on mobile and I select "Desktop site" I receive results without ?no-cache in google. |
@hackhat There is a way to exclude no-cache in Google Webmaster tools: https://support.google.com/webmasters/answer/6080550?hl=en&authuser=1&ref_topic=6080547 Also implementing canonical urls should help too. |
I've seen some mutterings within this repo around I may not be understanding the core concept; and the parameter itself has caused a bit of a headache for us internally as of late. |
It's a work around to get gatsby-plugin-offline working. I agree it's not a great solution. @davidbailey00 could you look into other options for checking if a page has been seen? |
@KyleAMathews Appreciate the response; we're not using that plugin currently, but sounds like it's just kinda baked-in there in case it is. Do you happen to know of any workarounds to disable that entirely, or is that "too core" to touch at the moment until an alternative solution is figured out? |
It's in core right now |
Gotcha; while I'm not as versed into that part of the app in particular, if there is any headway on testing out a different solution; I'll be ready to give things a whirl on my end! |
@hackhat we're sorry to hear this! Is there any way you could let us know if you're able to reproduce this? I just tried with gatsbyjs.org and wasn't able to replicate. I also checked out Google Analytics logs, and didn't really see any issues, definitely not ?no-cache=1 on all of our logs! Could be an outdated gatsby-plugin-offline plugin issue, perhaps? |
Hi @hackhat @zslabs, I'm the one responsible for the The purpose of this query is to prevent service workers gobbling up pages on your site which aren't generated by Gatsby - e.g. if I visit Netlify CMS So to work around this, we check the HTTP status code for that page if Gatsby can't find it, and then unless it's a 404, we redirect there appending However, what's happening here is that Gatsby isn't loading the resources properly for a page, and therefore thinking that it's a page not generated by Gatsby, just like Netlify CMS. So if we were to look in the Googlebot console we'd probably see an error saying "Found ?no-cache=1 while attempting to load page directly" - this is logged whenever Gatsby detects the just problem described, and should never be logged on a working app. Until now I thought we'd ironed out all edge cases and prevented this from happening, but from the looks of things there are still some cases where it might occur - which might be difficult to debug if it's only problematic with Googlebot. Hopefully it'll also be problematic in some desktop browsers so we can actually tell what's going wrong rather than just guessing - last time I checked in Chrome there were no issues, and we're currently working on adding tests to prevent this sort of thing. |
👋 @davidbailey00 Thanks for jumping in and the rundown of how that feature works! Googlebot certainly doesn't make it easy, does it?! We also ran into some weirdness with it's mobile-bot not being able to read our pages because we were using the CSS You're correct though; desktop seems to be working pretty consistently, but I'm wondering if there's something going on with mobile that we just can't see. We're hosting the site on Netlify and not really doing anything out of the ordinary there, but I've included our
Would you be able to expand on what "resources" could cause a page to fail and show that cache? I've seen some oddities where (even on desktop) there's some type of decoding issue with the JSON payload that is "the content" of the page ( Thanks again for digging into this! |
@davidbailey00 If you add your website to analytics.moz.com campaign it will also be redirected to no-cache, so frustrating. I'm hosting on cloudflare + s3 and again nothing fancy here as well. |
@DSchau and I have decided to remove the |
@davidbailey00 excellent decision, it seemed to be a bit tricky and with many edge cases. Thank you very much for your support. |
👋 @davidbailey00 Just wanted to check-in to see if there was anything I could help test. Thanks again for looking into this! |
@zslabs is there more info on your end about this issue? We actually solved this issue previously as there was an issue in the source code, i.e. arrow functions weren't being transpiled in Chrome 41 (what Googlebot uses). You shouldn't see many of the no-cache hits in your normal flow! |
@DSchau Oh, interesting! Did you have the commit for that handy? I've been holding off on upgrading a few deps until this was resolved, so wanted to see where we were at currently. |
@zslabs it was not an issue on our end, but rather with a node_modules lib making its way into the browser untranspiled! To clarify, is this at all related to any Gremlin stuff? |
Partly - our SEO guy mentioned he was still seeing these sporadically after that other issue was fixed, so I was hoping a fresh-look at the no-cache feature might shed some light on a different (or better) way to handle those. |
Yeah - we've seen it very infrequently on our end on gatsbyjs.org, as well. I believe @davidbailey00 is working on a PR that will avoid the no-cache stuff, so we'll just keep you in the loop on that? Should be something to see very soon here! |
Sure thing, sounds great! Thanks as always. |
Not a problem :) Thanks for using Gatsby! We're excited to get this fixed and all the issues ironed out :) |
Yeah that's right, I'm working on the new approach right now actually - hopefully it should be ready later today or tomorrow! |
I'm on mobile so I can't put too much info, but my search results on Google are all ?no-cache=1 I don't know why it's so messed up. I now have a lot of duplicate content indexed and I hope I won't get blocked or similar.
What is going on?
Thank you
Description
Describe the issue that you're seeing.
Steps to reproduce
Clear steps describing how to reproduce the issue. Please please please link to a demo project if possible, this makes your issue much easier to diagnose (seriously).
Expected result
What should happen?
Actual result
What happened.
Environment
Run
gatsby info --clipboard
in your project directory and paste the output here. Not working? You may need to update your global gatsby-cli -npm install -g gatsby-cli
The text was updated successfully, but these errors were encountered: