Marketo, Internet Explorer, X-UA-Compatible, mktoPreFillFields
I've been developing this as my standard start for web pages:
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge;" />
Unfortunately, Marketo outputs something completely different:
<!DOCTYPE html>
<html class="no-js"><!--<![endif]--><head>
<script type="text/javascript">
var mktoPreFillFields = { ... } /* an array of prefill data */
</script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge;" />
- Why would Marketo mangle the multi-HTML-element section? Can it be fixed to not do that?
- I'm also open to the idea of using a marketo-specific workaround.
- Why does Marketo insert the mktoPreFillFields script as the first child of <head>? Can it be fixed to insert that at the end?
- https://nation.marketo.com/message/65126#65128
- Best Practice: Get your HEAD in order - IEInternals - Site Home - MSDN Blogs
- This matters because: IE 11 will miss the "X-UA-Compatible" meta tag and render using IE7 emulation mode, by default. Many users will simply have a terrible web page experience.