11-01-2017 08:03 AM
Using the most current browser versions, ebay pages often result in a "Warning: Unresponsive Script" modal dialogue for me. For the end-user, your browser "locks/freezes up".
After research, I was disappointed by the past and current responses ebay associates provided end-users as solutions; a few were "you have a virus" and many others were "it's your browser. Upgrade." For them without experience writing code, which would be the average customer; providing these types of responses places improper aggravation on the user.
For curious end-users, here are the most common causes, which happens to be the causes of my issue; first some technical: Debugging ebay's somewhat-obfuscated and often dynamically-renamed JavaScript, I found uses of libraries to parse page content and make remote calls to other scripts using inefficient Regex to load resources and traverse the DOM using the slowest selectors possible.
When code like this locks up your browser, you as the end-user are at no fault and there is nothing on your (the client) side to stop these locks/freezes. Just know the main three causes with such code are (a handy list to use as counter response):
(1) Making calls for remote resources; each of which awaiting a response/timeout. If an ebay page uses too many, those waiting calls can make your browser appear "locked".
(2) No indices to prevent infinite loops/calls which eventually exhaust the stack. I read no defensive coding and few null checks.
(3) Usage of content providers to host scripts known to track end-user activities and serve advertisements. If you have an "ad blocker", "no script", or; like me, an extensive HOSTS list, these inaccessible scripts will lock your browser as soon as the script is loaded. In my HOSTS file, I block all Google-related ads/analytics which is another source of annoyance as an end-user.
My call stack when ebay locked Firefox:
truncate (templates-js-438dd6.js#7)
each (kixmrk5orq3d3huw05vg5j0shq2.js#2)
each (kixmrk5orq3d3huw05vg5j0shq2.js#2)
truncate (templates-js-438dd6.js#7)
(anonymous) (templates-js-438dd6.js#107)
load (templates-js-438dd6.js#5)
r (templates-js-438dd6.js#3)
A (templates-js-438dd6.js#3)
B (templates-js-438dd6.js#4)
(global) (templates-js-438dd6.js#115)
- N De Lioncourt
11-02-2017 12:42 AM