The Now Platform® Washington DC release is live. Watch now!
Service Portal was created to provide a streamlined, responsive user experience across different browsers and devices. It leverages modern web technologies like AngularJS to create a beautiful interactive experience for your users. But if you're using Internet Explorer 11 as your standard browser, you may have seen that this does not always work out as planned.
IE11, unfortunately, does not always manage memory very well — especially when using modern web technology. There are several known bugs in IE11 that cause memory leaks, and these memory leaks lead to slowness in your browser, ultimately causing your browser to crash when you open a page. I think we can all agree there is no worse user experience than your browser crashing when you open a page. We're going to look at why these issues happen and what you can do in your own Service Portal to minimize the impact of these issues.
So first, let's start with the ugly truth. IE11 has known memory leak bugs. If you're curious about what those are and what is published about them, this discussion with maxarderius is a good place to start: https://community.servicenow.com/thread/224646
The unfortunate reality is that Microsoft no longer supports IE11 aside from security-related fixes, so these issues are not going to be addressed. The good news, though, is that in general, even though these memory leaks exist it will take a long time for them to really become noticeable issues to a user. However, some websites and pages will exacerbate the issue much more quickly. In order to minimize the impact these issues have on a portal and ensure it is not one of those pages, we need to understand what development patterns will cause memory issues in IE11 and how to avoid them.
In general, there are four big problem areas when working with Internet Explorer:
The technical details for each of these is going to boil down to the same thing: Garbage collection in IE11 does not clean up all of the objects stored in memory from these four areas when you refresh a page, whereas Chrome and Firefox do this pretty well. The result is that as you navigate around and/or refresh the same page over and over, some of the objects are kept in memory. Over time this builds up to a point where eventually the process will crash because its memory usage is too high.
While we can't fix the bug in IE11 itself, ServiceNow (along with many other web developers who have to work around these issues) has put a lot of time into finding ways we can reduce the impact of these issues. We've found that by following a few best practices, you can greatly reduce the amount of memory that is leaked to a point where most users will likely not notice it.
$scope.$on('$destroy', myEvent);
By employing these techniques when developing your portal, you can significantly reduce the impact of IE11's memory leak bugs on your portal. While there will always be some memory being leaked in most cases, by following these practices you can reduce it to a negligible amount and greatly improve user experience. If you want some more info on some of the techniques discussed here I have provided a list of helpful resources below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.