1

I have created a website with jQuery.

Now I want to remove extra code from my .js file to reduce the burden on my website.

How do I do that?

I tried brute force approach but it seems tedious.

Ozzy
  • 8,244
  • 7
  • 55
  • 95
Pulah Nandha
  • 774
  • 4
  • 23
  • 3
    You do that by cutting out the bits you don't need. Which bits are they? I don't know - you posted no code. Good luck! –  Jul 10 '13 at 04:08
  • I'm not aware of any tools to do this automatically. – Jonathon Reinhart Jul 10 '13 at 04:11
  • SO isn't a requests site, it's a help/advice/guidance site..you can ask about cleaning up a certain function, but we're not going to help you fix all of your code. – Ilan Biala Jul 10 '13 at 04:11
  • any kind of web site. i have use just hide function from .js file so all another data is not important for me. – Pulah Nandha Jul 10 '13 at 04:12
  • 1
    @IlanBiala Bad comment. I don't think the OP was asking us to do that. He was asking how to go about cleaning up his own code, without manually finding every unused function, etc. – Jonathon Reinhart Jul 10 '13 at 04:12
  • 2
    "brute force" approach is tedious but you will learn much from it. – mbm Jul 10 '13 at 04:13
  • You might be able to upgrade jquery to 2.0 or use Zepto as a jquery alternative depending on what you are doing with you site. – Orangepill Jul 10 '13 at 04:14
  • @Jonathon Reinhart: yes sir i want exactly u told – Pulah Nandha Jul 10 '13 at 04:14
  • @JonathonReinhart a simple google search could've answered this question..Check out the about page of SO http://stackoverflow.com/about and scroll down to the "Get answers to practical, detailed questions" to see the problem with this question. – Ilan Biala Jul 10 '13 at 04:15
  • 2
    @IlanBiala Thanks, I'm quite familiar with the contents of that page, as I've linked to it in many comments. I'm just saying that your comment implies that the OP is asking us *to* clean up his code, when in fact he's asking us *how to* clean up his *own* code. Sure, he should have searched better, but he's obviously not a native English speaker, and finding the right search terms can be difficult. Don't degrade him for asking for help (on how to help himself). – Jonathon Reinhart Jul 10 '13 at 04:18
  • @ Jonathon Reinhart: thank you sir for understanding my problems. – Pulah Nandha Jul 10 '13 at 04:26

1 Answers1

1

Some tips:

Community
  • 1
  • 1
Ozzy
  • 8,244
  • 7
  • 55
  • 95