How can I test how Gatsby performs with Javascript disabled, in local development? In this comment, the suggestion is to disable the Javascript preference to ensure service workers are also disabled. This works in production, but does not work when running gatsby in dev mode.
Thanks for your help.
So this is all dependent on your web browser you are using.
On Google's Web Fundamentals site, they have a page describing how to Turn off JS in Chrome's Dev Tools
There's a Firefox extension convienently called Disable JavaScript
If you open the preferences menu, go to Security and you can uncheck the Enable JavaScript checkbox.

Hope this solved your question
Unfortunately, no. I understand how to disable Javascript, and that works when our site is deployed. However, if I'm running the site locally and do this, this is all I see:

The markup is just a noscript tag.
@cameronmcefee SSR is a build-time optimization, not a develop-time optimization.
In other words, we don't statically render to HTML at _develop time_ (and therefore serve an experience that doesn't require JS) because it's extra overhead and a slower experience that a user wouldn't generally need. If you want to test the non-JS experience, you can use:
gatsby build
gatsby serve
and open up localhost:9000.
Hope this helps! Going to close this as answered, but if we can help further please feel free to reply/re-open and we can take another look. Thanks!
Ah, that makes sense. I appreciate the explanation.
@DSchau - Your response was extremely helpful
gatsby build
gatsby serve
Worked for me.
Most helpful comment
@cameronmcefee SSR is a build-time optimization, not a develop-time optimization.
In other words, we don't statically render to HTML at _develop time_ (and therefore serve an experience that doesn't require JS) because it's extra overhead and a slower experience that a user wouldn't generally need. If you want to test the non-JS experience, you can use:
and open up localhost:9000.
Hope this helps! Going to close this as answered, but if we can help further please feel free to reply/re-open and we can take another look. Thanks!