TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Should a website work without JavaScript?

13 点作者 baptou12超过 10 年前

13 条评论

DanBC超过 10 年前
Many websites would be dramatically improved if they stopped fucking about with stupid pointless javascript and just delivered content, marked up for HTML and styled with CSS.<p>Some websites have applike functionality and so they need javascript. I am not talking about those. I&#x27;m talking about newspaper sites that preload a huge chunk of JS before displaying any text.<p>(The way you&#x27;ve asked this question is sub optimal.)
Doctor_Fegg超过 10 年前
Define &quot;a website&quot;.<p>Should Government statutory information be accessible without JavaScript? Yes, without question.<p>Should something intrinsically &#x27;app-like&#x27; - for example, a draggable map explored by panning, zooming and interacting with vector data - work without JavaScript? Much less compelling.<p>Ask yourself where your site falls between the two.
andybak超过 10 年前
In an ideal world even websites at the &#x27;app-like&#x27; end of the spectrum would degrade gracefully but I think it&#x27;s idealistic to expect someone building something akin to Google Maps to put the extra work in.<p>So all I think it&#x27;s fair to expect is that &#x27;content&#x27; is always accessible. That does include complex search interfaces in most cases - that&#x27;s one situation where I think it is obligatory to put the extra legwork in as you&#x27;re basically still a content site rather than a web app.
评论 #8946388 未加载
评论 #8946428 未加载
adventured超过 10 年前
There is no objectively correct answer for this (yes or no).<p>It&#x27;s up to the use case. What do you want to accomplish? What users do you care about or not?<p>Should a website use images? Sprites? Font icons? Tables or CSS positioning? Should a site have a dedicated mobile version? Should your site have an app? A twitter account? Should your site use flexible layouts? Should your site use any features unique to one browser? And so on. The only answers are opinions.
codefisher超过 10 年前
Users should be able to access all your content without JavaScript. I think the old rule of progressive enhancement still applies, JavaScirpt can add extra things, but everything should remain functional without it. If it does not work without it, your doing yourself harm I think, remember one very important user is search engines, and they don&#x27;t (as far as we know) use JavaScript.
donatj超过 10 年前
Professionally speaking, that is one of my most important tests of the quality of a site. When I see an Ajaxed site on a resume, it&#x27;s the first thing I check as it is a sign of a true craftsman taking care in their work.<p>Ajax should ALWAYS degrade gracefully. Sites that use Ajax just to use it with no real benefit to the end user perhaps for a slight bandwidth savings are a particular irritation. It&#x27;s often just a strong degradation of the user experience to make up for the deficiencies of your back end, or worse yet for no real reason other than it being the flavor of the decade.
detaro超过 10 年前
If graceful degradation is possible, it should happen. Of course, if you implement critical features in javascript it is unreasonable to demand a full fall-back server side, but things like menus, displaying text and images, normal form input shouldn&#x27;t break with javascript disabled (or just EXTERNAL javascript disabled, which opens up another can of fun bugs).<p>Your landing page should work without javascript. Your blog shouldn&#x27;t need javascript to display your content in useable form. I should be able to use your webshop (including content filters, shopping cart, checkout) without javascript, but payment widgets from external providers are a reasonable exception. Online office apps like Google Apps need javascript, but it would be great if one could at least view documents without it.
leovander超过 10 年前
If you are making a mobile application based around a wrapped in-app browser(Apache Cordova&#x2F;PhoneGap and Appcelerator Titanium), I&#x27;d say yes.<p>I know most people wouldn&#x27;t even think they could disable Javascript on their phone or even know where to look in the first place, but there is always a chance that it could be disabled.<p>The most recent experience I had was when I disabled the Javascript on my iPhone 4s for a web accessibility course and forgetting to reenable it. Later I&#x27;m looking to find a place to eat with good reviews, and Yelp&#x27;s mobile view would not load and gave me a lovely message to enable Javascript. I know it is not a wrapped in-app browser liked I mentioned before, but the app should at least give me a bare bones list at the end of the day.
mschoebel超过 10 年前
Some things just won&#x27;t work without JavaScript. Or would be way, WAY too hard to implement without JS.<p>But a website should at least <i>appear</i> without JavaScript. I&#x27;ve seen lots of websites that look empty or horribly distorted when JavaScript is disabled. That should not happen.
评论 #8946514 未加载
cabirum超过 10 年前
If &quot;a website&quot; is a resource intended to be opened in a modern web browser, the answer is yes. In this case developers can safely assume the three integral parts - html, css, and js - are enabled and available for use.<p>If a website - a blog - just displays some text, a raw&#x2F;plain version can be provided along with it, not necessarily on the same web address.<p>When a website displays&#x2F;formats&#x2F;filters some data, an API can complement it.<p>But sometimes, a website is an app where no alternative representations would make sense. Then the answer is no.<p>It&#x27;s all about needs, requirements, possibilities, and common sense.
ddebernardy超过 10 年前
I&#x27;d be curious to know what percentage of sites remain in the 88.2% list after ignoring these three use cases:<p>1. Site analytics<p>2. Displaying ads<p>3. Fighting spam
toothbrush超过 10 年前
Yes.
bmn_超过 10 年前
Yes.