Try our conversational search powered by Generative AI!

Dan Lister
Aug 21, 2009
(0 votes)

Self Closing Script Tags in Internet Explorer

It turns out that all versions of Internet Explorer do not like self closing script tags or as the Internet world calls it, element minimization. Self closing script tags are perfectly valid XHTML elements, but invalid HTML elements. Internet Explorer only supports XHTML to the extent that only HTML-compatible markup is possible. All other major browsers support XHTML markup.

The below example shows how this can be detected when script tags have been placed within the head element of a HTML page.


For the above, the 'NavTo' function would never be known to the body or other JavaScript files. In order for subsequent JavaScript files or code to be executed, the script tag of the offending element must be correctly formatted according to HTML markup standards. This will allow all browsers including Internet Explorer to successfully execute all JavaScript.


Aug 21, 2009


Please login to comment.
Latest blogs
New Series: Building a .NET Core headless site on Optimizely Graph and SaaS CMS

Welcome to this new multi-post series where you can follow along as I indulge in yet another crazy experiment: Can we make our beloved Alloy site r...

Allan Thraen | Jun 14, 2024 | Syndicated blog

Inspect In Index is finally back

EPiCode.InspectInIndex was released 9 years ago . The Search and Navigation addon is now finally upgraded to support Optimizely CMS 12....

Haakon Peder Haugsten | Jun 14, 2024

Change the IP HTTP Header used for geo-lookup in Application Insights


Johan Kronberg | Jun 10, 2024 | Syndicated blog

Copying property values

In this article I’d like to show simple Edit Mode extension for copying property values to other language versions. In one of my previous blogposts...

Grzegorz Wiecheć | Jun 8, 2024 | Syndicated blog