admin管理员组文章数量:1303670
Referring to this ticket here: .js/issues/4210 I'm currently wondering why when you disable javascript, most of the content using relay modern and NextJS does not work.
My initial guess is that since NextJS is a React library for server-side rendering, if JavaScript is disabled in chrome, then obviously React does not work. However, NextJS is server-side rendering so therefore disabling javascript on the client side should not be a problem? Therefore, why does this problem still occur?
Referring to this ticket here: https://github./zeit/next.js/issues/4210 I'm currently wondering why when you disable javascript, most of the content using relay modern and NextJS does not work.
My initial guess is that since NextJS is a React library for server-side rendering, if JavaScript is disabled in chrome, then obviously React does not work. However, NextJS is server-side rendering so therefore disabling javascript on the client side should not be a problem? Therefore, why does this problem still occur?
Share Improve this question asked Jan 22, 2019 at 17:01 its.davidits.david 2,2356 gold badges18 silver badges33 bronze badges2 Answers
Reset to default 6In a modern SSR scenario, as in an isomorphic application, only the first rendering is done by the server, that returns plain html
content together with the js
's that will be used for the subsequents rendering.
In case the browser has javascript disabled you should be seeing only the first rendering as a static page, since what the interpreter does is showing a plain html content, but then you shouldn't be able to interact with the page (that would require js to be enabled)
While @Karim's answer is correct, it is worth pointing out that a user can, technically speaking, partially interact with the page if you use "progressive enhancement". In this case, you use native HTML features to perform operations such as navigation to other pages, form submission, etc. Those do not require JS to be enabled to work correctly. Depending on your target audience, this might be more pain than its worth.
本文标签: reactjsSSR does not work when javascript is disabledStack Overflow
版权声明:本文标题:reactjs - SSR does not work when javascript is disabled - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741747999a2395652.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论