bigbadwolf.org

"I hate people, because in general people suck ass!"
  • Home
  • About

Zend Framework and Repeating Javascript Issue

May 28, 2008 11:51 pm John Development, PHP, Zend Framework

Well, I finally was able to determine why multiple copies of my JavaScripts where showing up in Firebug.  It appears that it boils down to a misunderstanding of when and how to use the headScript() method.

Apparently, this headScript(), headLink() and other methods seem to be really geared for inserting scripts at the controller/action level. Since I had them in my layout, they were repeating SEVERAL times and causing pretty poor performance as one would expect. Ahh, nothing like downloading the same files over and over and over…sheesh.

My solution and what seems to be the norm was to simply call the scripts from the layout statically. I just added a little inline PHP to get the baseUrl and poof! It worked like a champ.

Now on to more exciting stuff.

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

 

September 2010
M T W T F S S
« Jul    
 12345
6789101112
13141516171819
20212223242526
27282930  

Archives

  • July 2008
  • June 2008
  • May 2008

Categories

  • Development
  • Gaming
  • Hardware
  • House
  • Laptop
  • PHP
  • Playstation 3
  • Uncategorized
  • World of Warcraft
  • Zend Framework

Recent Posts

  • Thinkpad T61, Dell D830 Thoughts
  • World of Warcraft…Level 70 Priest BAY-BEEE!!!
  • Of Gaming rigs and websites.
  • Wishful Thinking
  • Zend Framework and Repeating Javascript Issue

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet

Development

  • Zend Framework Documentation

Copyright © bigbadwolf.org

Design by Robbie Williams WP Themes & ND83