Optimization
Aug 13, 2007
is there a way in which I could optimize my code with
just one for loop (see code below). I've come across this issue a few
times now and haven't found a solution as yet.. As you can see from
the code below I'm reusing the same loop throughout three functions, I
basically see this as a waste. Is there a more efficient way where I
could use the for loop just the once. Code:
View 2 Replies
Nov 30, 2005
Can anyone give me the 101 on optimizing javascript? Basically I've used a lot of javascript and DHTML and wanted to smooth my page out a little more.
I was testing my site, and the smooth sliding motion (THANKS MIKE FOSTER) that I thought was so so smooth was acting rather choppy. Turns out I had a couple other javascript heavy pages opened in another window and then *lightbulb* optimize your .js
So I know some basics about HTML and CSS opptimization, eg Tables=slow, CSS is there for a reason, limit style tags and js in HTML, elim white space etc. but i also read don't fiddle with javascript unless you know what you are doing. Well I don't, so here are a few:
How do browsers cache external js files?
several big external js files or many individual js files?
What about eliminating white space in .js will this cause problems?
Tips on preloading? (i'm doing a site on graphics so I'd rather put up a preloadpage hints?)
any articles or resources? best way to optimize/preload images?
View 4 Replies
View Related
May 15, 2011
I'm used to building objects in Visual Basic and I'm having difficulty simplifying this code into an object so I can just define and run about a dozen of them.
The code creates a button which changes on mouseover and on mouseclick. The button is a link to another page.
Also on mouseover the button slides to the right, giving a more intelligent feel for the user.
What are my options for streamlining this code so I can reduce the number of lines of code-clutter?
The code below is formatted properly.
PHP Code:
View 5 Replies
View Related