JW Player is not working or slow loading

We’ve been moving from externally hosting videos with YouTube to self-hosting them with the killer little video player called “jw player“.  I just could figure it out, JW player was not working, it appeared to be slow loading.

I was converting one of our landing pages (see it here – it is for our tow straps page) to use the new player when I ran into an issue with Chrome.  The video was working fine with Firefox – but chrome would spin and spin, then eventually choke out.  Another symptom was Chrome would crash the shock-wave plugin.  All bad news.

I finally found this post over at the jw player site – it turns out if you include the jwplayer.js file more than once – it will cause this issue in chrome.  That is exactly what I had done.

Bad code monkey.

My particular issue came because I was using a “tag” in a program called Netsuite.

Tags is kind of like a variable – I had already included the code in a different variable and then I re-included it.
So – if you find yourself where JW Player is not working or slow loading was hanging up or causing an error on chrome – see how many times you included the javascript file.

Smarty Templates and javascript

At my work – we have a classifieds systems which leverages smarty templates.  From what I have seen – smarty templates are not too bad, but I ran into some trouble with them when I needed to add some javascript.  Here is a link to the code I used to fix that issue.

Mobile theme with caching

We were working on adding a mobile theme to the site one day and I had to do a double-take.  All was good, we installed WPTouch mobile theme/plugin and it look fantastic on the iPhone.  Then I got the call – hey, the live site looking funny in IE>  I replied “what’s new IE always looks funny” – but what had happened was the WP3 Total Cache had done its job and cached the mobile site.  We quickly disabled it – and found a soution.

Sometimes mobile and caching do not mix – but after reading a post over at the WordPress forums, there is a good fix.  I tried this method out – and it worked grrrrrrreat.

Good luck – email me if you have issues – it was a quick fix.