Finding usage of jQuery UI in a big ugly codebase
Posted
by Daniel Magliola
on Stack Overflow
See other posts from Stack Overflow
or by Daniel Magliola
Published on 2010-06-11T00:40:44Z
Indexed on
2010/06/11
0:53 UTC
Read the original article
Hit count: 346
I've recently inherited the maintenance of a big, ugly codebase for a production website. Poke your eyes out ugly. And though it's big, it's mostly PHP code, it doesn't have much JS, besides a few "ajaxy" things in the UI.
Our main current problem is that the site is just too heavy. Homepage weighs in at 1.6 Mb currently, so I'm trying to clean some stuff out.
One of the main wasters is that every single page includes the jQuery UI library, but I don't think it's used at all. It's definitely not being used in the homepage and in most pages, so I want to only include the where necessary.
I'm not really experienced with jQuery, i'm more of a Prototype guy, so I'm wondering. Is there anything I could search for that'd let me know where jQuery UI is being used?
What i'm looking for is "common strings", component names, etc
For example, if this was scriptaculous, i'd look for things like "Draggable", "Effect", etc. Any suggestions for jQuery UI?
(Of course, if you can think of a more robust way of removing the tag from pages that don't use it without breaking everything, I'd love to hear about it)
Thanks!! Daniel
© Stack Overflow or respective owner