Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
If a script works in one website and not in other, means there is some clash in the jquery library versions..
Maybe it is using some older version of jquery to execute -
lewdogg9956yIE forces a redraw of all children everytime you use JavaScript to add a class, remove a class or inject style attributes to an element.
Is your script adding display:none to a butt load of elements? If so, it will freeze the browser until all related elements are redrawn.
Instead, consider using JavaScript to add or remove a class name of “hidden” and let the CSS handle the hiding and showing. It seems weird, but IE uses a different, more efficient engine to re-render elements that are hidden with the class name method. -
oztek4036y@lewdogg not exactly.
But my script is adding removing dom element on some specific element click. (Not adding/removing class though but the whole dom element).
Maybe that is the reason of hanging. But it hangs on IE only and onthat customer's page only and not on other page (same script) -
lewdogg9956y@oztek do those elements have style attributes? If they do, just use class names instead.
I have no idea what you are doing, so it is speculation. This is just the issue I have always had with IE.
I have begun to even adopt using methods that check to see if a class name is already present. You aren’t using jquery, but the jquery addClass method in IE will continue to keep adding the same class name over and over again, triggering a redraw even though nothing has changed. Instead, I use my own method “addClassIfNotExists” which will check first before adding. For a show/hide script, this will only “hide” an element if it is not already hidden. Other browsers are way more efficient, so no worries.
In short, IE can go straight to hell.
Related Rants
So today one of my client told me that my script is freezing their website on IE browsers. I tested and told them that website is being freezed even without my script.
Now they sent me analyzed scenario and they concluded that it freezes 4 out of 10 times without script. But it freezes 12 out if 15 times with script -_-. So there is something really wrong with the script and I need to fix it urgently otherwise they will kick me out. #fuckedupLogic
Funny thing is that same script is loaded in so many other client's website and it doesn't freeze any shit.
rant
fucked up shit
client
client logic
random
clients from hell
web development