ブラウザの互換性
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
コンテンツ ドリブンのウェブ アプリケーションを構築する場合は、オーディエンスが使用しているブラウザを考慮することが重要です。最新機能に対応していない古いブラウザを使用している企業もあれば、より多くの機能を備えた新しいブラウザを使用している企業もあります。ブラウザの選択にかかわらず、すべてのユーザーがアプリケーションにアクセスできます。
プログレッシブ エンハンスメントを利用するか、すべてのブラウザがサポートする最も基本的な機能から始めて、新しいブラウザ向けの機能を追加します。機能の検出も、時代遅れのブラウザや新しいブラウザを使用しているユーザーにリーチするための戦略です。機能検出を使用すると、ユーザーのブラウザでサポートされている機能を判別し、適切なコードを読み込むことができます。アプリケーションでは、ユーザーのブラウザでサポート可能な最新の機能を使用する必要があります。
古いブラウザと最新のブラウザの両方をターゲットにする場合は、いくつかのトレードオフを考慮する必要があります。まず、ブラウザごとに異なるコードを使用することが必要になる場合があります。これにより、コードが複雑になり、メンテナンスが困難になります。ブラウザによっては、最新の機能を使用できない場合があります。これにより、アプリの機能が制限される可能性があります。
アプリケーションによっては、古いブラウザでも法的理由やビジネス ユースケースでサポートが必要となる場合があります。大部分のユーザーが古いハードウェアを使用していてアップデートできない場合は、ポリフィルが必要になることがあります。ポリフィルを使用すると、古いウェブブラウザに最新の機能を提供できます。また、古いブラウザとの互換性を維持したまま、最新のウェブ テクノロジーと API を使用できます。
使用されているテクノロジーや API を確認できる優れたツールは数多くあります。
- プロジェクト ベースライン: サポートされているブラウザで適切に機能するアプリを提供することで、デベロッパーのエクスペリエンスを向上させる取り組みです。このプロジェクトは、Google やその他の一般的なシステムによって支えられています。
- Caniuse: ウェブ API を検索して、トラッキングされているすべてのブラウザのサポート状況を確認するためのリソースです。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eWeb applications should be accessible to all users regardless of their browser choice, potentially using progressive enhancement or feature detection to cater to different browser capabilities.\u003c/p\u003e\n"],["\u003cp\u003eWhile supporting older browsers might necessitate using different code or limit access to the latest features, it can be crucial for legal compliance or business needs, especially when users rely on older hardware.\u003c/p\u003e\n"],["\u003cp\u003ePolyfills can bridge the gap between modern web technologies and older browsers, ensuring compatibility while enabling the use of the latest features.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize tools like Project Baseline and Caniuse to determine browser compatibility and make informed decisions about web development strategies.\u003c/p\u003e\n"]]],["When creating web applications, consider browser compatibility. Employ progressive enhancement by starting with basic features and adding advanced ones for newer browsers. Use feature detection to load appropriate code based on browser capabilities. Supporting both old and new browsers may increase code complexity and limit functionality. Polyfills can bridge the gap by adding modern capabilities to older browsers. Tools like Project Baseline and Caniuse help determine browser support for various technologies.\n"],null,["# Browser compatibility\n\nWhen building a content driven web application, it is important to consider\nwhich browsers your audience is using. Some might use older browsers that don't\nsupport the latest features, while others may be using newer browsers that have\nmore features. Your application is accessible to all users, regardless of their\nbrowser choice.\n\nUtilize progressive enhancement, or start with the most basic features that all\nbrowsers support, and then add additional features for newer browsers. Feature\ndetection is another strategy to reach users with dated or new browsers. With\nfeature detection, you can determine which features are supported by the user's\nbrowser, and then you load the appropriate code. Your application should use the\nmost up-to-date features that the user's browser can support.\n\nThere are a few tradeoffs to consider when targeting both old and modern\nbrowsers. First, you may need to use different code for various browsers. This\ncan make your code more complex and difficult to maintain. You might not be\nable\\\u003e to use the latest features in all browsers. This can limit the\nfunctionality of your application.\n\nDepending on the application, older browsers may still need support for legal\nreasons or business use cases. If the majority of the users are on older\nhardware and cannot update, then polyfills may be necessary. A polyfill provides\nmodern capabilities to older web browsers and can allow you to use the most\nmodern web technologies and APIs while still ensuring compatibility with old\nbrowsers.\n\nThere are many great tools to check what technologies or APIs are used:\n\n- [Project Baseline](https://web.dev/baseline/): is an effort to improve the experience of developers by providing what works well in supported browsers and is backed by Google and other commonly used systems.\n- [Caniuse](https://caniuse.com/): is a resource to look up Web APIs and see the support status across all tracked browsers."]]