X-UA-compatible: What it is and why you don’t need it on your website (2024)

Nathaniel

Posted on • Originally published at getoutofmyhead.dev

X-UA-compatible: What it is and why you don’t need it on your website (3) X-UA-compatible: What it is and why you don’t need it on your website (4) X-UA-compatible: What it is and why you don’t need it on your website (5) X-UA-compatible: What it is and why you don’t need it on your website (6) X-UA-compatible: What it is and why you don’t need it on your website (7)

#html #webdev #webperf #todayilearned

The x-ua-compatible is everywhere. It appears in the <head> of extremely popular websites — it may even be on your website. But what is it?

This real life example was captured in the wild on theguardian.com weighing 52 bytes:

<meta http-equiv="X-UA-Compatible" content="IE=Edge">

What does x-ua-compatible do?

This tag is used to tell Internet Explorer (IE) to render your web page in specific, non-standard ways.

IE has different different document modes that allow you to view a webpage as if you we're using an older version of the browser.

IE 6 and 7 (and other old browsers) did not properly implement W3C specifications. So, when Microsoft released the (mostly) spec compliant IE 8 — sites built especially for IE 6 and 7 didn't work as expected.

Document modes was the solution to this problem —and the x-ua-compatible meta tag was how you chose a document mode.

To understand why your site definitely does not need this tag, we'll have to dig a little deeper…

What does IE=Edge mean?

IE=edge tells IE to use the latest available document mode. That sounds great — we want everone to get the best experience possible.

But, this is already the default experience! So long as you correctly declare your <!doctype> (which you will), IE will use the latest document mode. That means IE 8 uses IE 8 mode. IE 9 uses IE 9 mode, and so on.

All IE=edge does is tell IE to do something it already does. It's maddening.

So, it does nothing. Then why is it everywhere?

My theory — developers were afraid that IE would render their page in an older document mode. There was a lot of uncertainty surrounding IE and the documentation for this tag is overly complicated — it was better to be safe than sorry.

Using this tag would also stop a compatibility mode button from appearing in IE 8-10. If the button was present, it allowed users to toggle between a spec-compliant mode and older document modes — which may have spooked some developers.

x-ua-compatible was added to templates and frameworks by clever developers —who probably know something you don't —and the more it appeared the more it seemed like it was necessary.

Bootstrap, a very popular UI framework made by Twitter, recommended using this tag up until 2018.

Just delete the tag

Just delete it. Both Microsoft and Mozilla now recommend correctly declaring your doctype to stop IE from entering compatibility mode (and other browsers from entering quirks mode).

Correctly declaring a <!doctype> is important —it has nothing to do with old IE compatibility modes or x-ua-compatible —you should be doing it anyway.

Make sure this code is the first thing in your document:

<!doctype html>

chrome=1 and some more weirdness.

Sometimes you'll see an additional value along side IE=edge:

Here's an X-UA-Compatible meta tag found on cnn.com weighing 62 bytes:

<!-- DISGUSTING --><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"><!-- Kill it with fire -->

Disgusting, isn't it?

This is used to tell IE 6-8 to use Chrome Frame — a browser extension that runs the Chromium JavaScript and rendering engine inside IE —like a browser inside a browser.

This was a solution for legacy browsers to use Google Wave, a predecessor to Google Docs.

Users of IE 6-8 with Chrome Frame installed, could potentially have a better experience if you add that tag…if they exist!

Should your site support IE 6-8 with Chrome Frame installed?

Should your site should support legacy browsers? It's a difficult question —I think you should support as many as you can without sacrificing the security of users on modern browsers.

~0.04% of web users still use IE 6-8. That's millions of people, and their access to your website shouldn't be dismissed without some thought.

There are some things that should be taken into account:

X-UA-compatible: What it is and why you don’t need it on your website (2024)

FAQs

X-UA-compatible: What it is and why you don’t need it on your website? ›

What does x-ua-compatible do? This tag is used to tell Internet Explorer (IE) to render your web page in specific, non-standard ways. IE has different different document modes that allow you to view a webpage as if you we're using an older version of the browser.

What does x-UA compatible mean? ›

X-UA-Compatible is a document mode meta tag that allows web authors to choose what version of Internet Explorer the page should be rendered as. It is used by Internet Explorer 8 to specify whether a page should be rendered as IE 7 (compatibility view) or IE 8 (standards view).

What is X UA compatible for all browsers? ›

In summary, the tag with http-equiv=”X-UA-Compatible” content=”IE=edge” ensures that IE uses the latest available rendering engine to render a web page, helping to ensure compatibility with modern web standards and features. This tells IE to render the web page using the IE9 rendering engine.

How do I run a website in compatibility mode? ›

To open a website in IE mode:
  1. Click Browsers & Emulators → Browers, then open Edge.
  2. In Edge, click ... → More tools → Open sites in internet explorer mode. The IE icon appears, and Edge is in IE compatibility mode. Every website that is opened in this tab is in IE mode.
Apr 7, 2024

What is meta HTTP equiv x UA compatible content IE edge chrome 1? ›

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> serves two purposes. IE=edge : specifies that IE should run in the highest mode available to that version of IE as opposed to a compatability mode; IE8 can support up to IE8 modes, IE9 can support up to IE9 modes, and so on.

What is the use of meta HTTP equiv? ›

Definition and Usage

The http-equiv attribute provides an HTTP header for the information/value of the content attribute. The http-equiv attribute can be used to simulate an HTTP response header.

What is the best browser for cross devices? ›

Google Chrome

Chrome is by no means a bad browser. Quite the contrary: it's a brilliant browser with a superb library of add-ons, cross-platform support and sync, excellent autofill features, and some great tools for web developers.

What does it mean to be compatible with your browser? ›

Browser compatibility means that your website can be 'translated' effectively via a particular browser or operating system, such that it can be accessed by and is fully functional for a user. A site may behave perfectly in one browser but still have issues and errors in others.

How do I deal with cross-browser compatibility issues? ›

How do I fix Cross-Browser Compatibility Issues? To address cross-browser compatibility issues, ensure that your website adheres to web standards, utilizes CSS frameworks like Bootstrap, and tests it on different browsers, making necessary adjustments to code and styles as needed.

What does it mean when a website is compatible? ›

Browser Compatibility is the manner in which a web page looks in different web browsers. Different browsers read the website code differently. In other words, Chrome will render a website Differently than FireFox or Internet Explorer will.

Why is compatibility important in a website? ›

Implementing browser compatibility gives users the best experience possible. This has positive effects on your revenue, branding, and customer loyalty. It ensures that users get the most out of your site's content regardless of which browsers and devices they use.

How do I remove a website from Compatibility View? ›

Open Internet Explorer and click Tools → Compatibility View settings. The Compatibility View Settings window displays. If the administration console is added to the Compatibility View list, select the website and click Remove.

What does meta name viewport mean? ›

A viewport meta tag adjusts your content to a user's screen. It makes a page more responsive and prevents users from having to scroll horizontally or zoom. Here's an example of how a viewport tag impacts a basic page: The text in the display on the left is unreadable.

What is viewport in HTML? ›

The viewport is the user's visible area of a web page. The viewport varies with the device, and will be smaller on a mobile phone than on a computer screen. Before tablets and mobile phones, web pages were designed only for computer screens, and it was common for web pages to have a static design and a fixed size.

What are meta tags in HTML? ›

meta tags are HTML tags used to provide additional information about a page to search engines and other clients. Clients process the meta tags and ignore those they don't support. meta tags are added to the <head> section of your HTML page and generally look like this: <!

What is IE Edge? ›

Some sites are built to work with Internet Explorer and have functionality that isn't supported by modern browsers such as Microsoft Edge. If you need to view one of these sites, you can use Internet Explorer Mode in Microsoft Edge. Most sites work better on modern browsers.

Top Articles
Chili Mac Recipe - Belly Full
No Fail Fudge Recipe
#ridwork guides | fountainpenguin
Team 1 Elite Club Invite
Find All Subdomains
Retro Ride Teardrop
Tyrunt
New Day Usa Blonde Spokeswoman 2022
Canelo Vs Ryder Directv
Grand Park Baseball Tournaments
Crusader Kings 3 Workshop
Craigslist Dog Kennels For Sale
Cpt 90677 Reimbursem*nt 2023
Carolina Aguilar Facebook
Richland Ecampus
UPS Store #5038, The
Wbiw Weather Watchers
Tripadvisor Napa Restaurants
Www.craigslist.com Savannah Ga
St Clair County Mi Mugshots
Baja Boats For Sale On Craigslist
Munis Self Service Brockton
How to Make Ghee - How We Flourish
Foolproof Module 6 Test Answers
Motorcycle Blue Book Value Honda
Vlacs Maestro Login
Why Are The French So Google Feud Answers
Otis Offender Michigan
Haunted Mansion Showtimes Near Cinemark Tinseltown Usa And Imax
Emily Katherine Correro
Autotrader Bmw X5
Japanese Pokémon Cards vs English Pokémon Cards
Roto-Rooter Plumbing and Drain Service hiring General Manager in Cincinnati Metropolitan Area | LinkedIn
oklahoma city community "puppies" - craigslist
How to Destroy Rule 34
Bitchinbubba Face
Sunrise Garden Beach Resort - Select Hurghada günstig buchen | billareisen.at
Adam Bartley Net Worth
Omaha Steaks Lava Cake Microwave Instructions
Lovein Funeral Obits
Сталь aisi 310s российский аналог
Walmart Pharmacy Hours: What Time Does The Pharmacy Open and Close?
Trivago Sf
Unveiling Gali_gool Leaks: Discoveries And Insights
Dr Mayy Deadrick Paradise Valley
UT Announces Physician Assistant Medicine Program
Blow Dry Bar Boynton Beach
Studentvue Calexico
Iupui Course Search
American Bully Puppies for Sale | Lancaster Puppies
Ics 400 Test Answers 2022
Craigslist Charlestown Indiana
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 5793

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.