bigbadwolf.org

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

Zend Framework and Repeating Javascript Issue

May 28, 2008 Development, PHP, Zend Framework No Comments

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.

 

May 2008
M T W T F S S
    Jun »
 1234
567891011
12131415161718
19202122232425
262728293031  

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