Solved

Testing/Debugging with Internet Explorer (Document Mode/Emulation)

Posted on 2016-09-12
4
36 Views
Last Modified: 2016-10-30
When I use IE 11 (in document mode "Edge"), the javascript function "endsWith" is not defined, and breaks if I call it from within the webpage.

However, when I go sit down at my co-worker's desk and try it, it does have "endsWith" defined.  So I compared the browsers and they are both IE 11 (down to the same version #).

So,

1.  How is this possible?  Is there some way to ammend/update/upgrade/improve the browser's javascript?
2.  How am I going to debug multiple IE's given that two IE 11's are doing different things?



Thanks!
0
Comment
Question by:FLEA2007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 2

Expert Comment

by:Dillyn Barber
ID: 41795286
If the javascript is in the html it most likely is a setting issue (or conflict from a browser addon). If it is an external JS file linked in try to append async="async" to it and/or clear browser cache.
0
 
LVL 22

Expert Comment

by:Kim Walker
ID: 41795362
Do they have the same operating system version? Technically, endsWith() isn't supported in IE 11?
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 41795419
endsWith is supported by MS Edge but none of MS IE (the last is 11) :
https://msdn.microsoft.com/en-us/library/mt146835(v=vs.94).aspx

Here the list of document modes :
https://msdn.microsoft.com/en-us/library/ff406036(v=vs.85).aspx

Double check you're in Edge mode if you launch IE11 (check the Emulation Tab) :
Check the User agent too :)

You can add the following code to extend the String object with endsWith :
String.prototype.endsWith = function(suffix) {
    return this.substr(-suffix.length) === suffix;
};

Open in new window


You can also force the browser to use Edge compatibilty mode :
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

Open in new window

0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question