Nginx and HTML5 Video in Firefox

Recently I moved my site to a new VPS run by me, the whole process went smoothly and after removing a few server specific .htaccess commands the site was up and running again.

I noticed however that the HTML5 video files that I have been using on a trial basis had stopped working with a big X in the middle of the video frame, but only in Firefox.

This indicates many possible problems with the video, some of which I could immediately dismiss as the file worked fine and other browsers such as Chrome had no issues playing it.

I remembered that it’s important to make sure the mime types are set correctly in apache, easily done with a modification of the .htaccess file in the site’s root directory, however I already had them in place, after trying different things I finally realised that nginx was serving the files directly so I did the following steps:

Open up the Nginx mime type configuration file, eg: /etc/nginx/mime.types
Paste these lines after the last video mime type, in my case it was avi:

    video/ogg                             ogm;
    video/ogg                             ogv;
    video/ogg                             ogg;

Restart nginx, it should then serve ogg video correctly to Firefox users.

Using Symbolic Links in Vista/Windows 7 for Google Chrome User Data

Recently I have been able to shed Firefox completely and start using Google Chrome, mainly due to it’s simple and speedy nature, but you can read all about that in my previous quick review of it when it first came out here.

I have recently purchased an OCZ Vertex SSD, the problem with Solid State Drives at the moment is their limited writes and while the MTBF is high enough to not expect to reach the limit before it becomes obselete it is still enough to make you self conscious about what gets to write to the drive.

Web browsers are arguably the most common abusers of file reads/writes on hard drives, the cache is constantly being written and overwritten as you browse and SSD users often look for a way to keep a browser’s cache off their SSD. With Firefox it is as easy as using Firefox Portable, it’s also quite handy to use if you move from computer to computer, but Google Chrome doesn’t have this feature yet, though a Chromium based browser SRWare Iron has a portable version.

There is a simple solution for keeping Chrome’s cache and other user data on another drive and that is the symbolic linking feature found in Windows Vista and Windows 7.

Move the User Data folder from the C:\Users\{username}\AppData\Local\Google\Chrome directory and place it on the other drive in whatever folder you want to call it, I simply put mine in D:\Chrome Profile

The next step is open up Command Prompt as an Administrator (right click, then click “Run as Administrator”) then type in the following command

mklink /J “where you want the symlink and what you want to call it” “where the real folder is”

For Example:


mklink /J "C:\Users\{username}\AppData\Local\Google\Chrome\User Data" "D:\Chrome Profile\User Data"

In this case the symlink name must be called User Data.

The /J command tells it to make a Directory Junction, in other words make windows applications believe that the folder is in the same spot as the symlink, you will notice that if you head to the chrome AppData folder on the SSD that there will be a folder with a shortcut icon in it called User Data, if you double click on it all your user data files with be inside and unlike opening up a normal shortcut, or soft symlink, the files in the folder will all appear to be on the SSD in the correct folder.

If you open up Google Chrome it will open as if nothing happened.

Update 22nd August 2009: I have done the same thing with Firefox’s ‘Mozilla’ profile directory, the only problem is if you load Thunderbird Portable it will for some reason (and somehow) delete your ‘Mozilla’ junction for Firefox, the solution for now is to set up Thunderbird with the ‘Thunderbird’ folder in the same fashion and not use Thunderbird Portable for this function.

First WordPress Theme

I decided that I would give a go at writing an ambitious WordPress theme that hopefully will be much different from most WordPress themes, the general layout is familiar, but with little twists so I hope to bring something different to the WordPress community.

I have hit many snags along the way but so far it is W3C compliant and works in IE 7 and 8, FF and Safari/Chrome, however it looks shocking in IE6 using IE NetRenderer

I started writing this post 3 days ago and forgot what else to write about.

The site design is a bit over the place still, it’ll be cleaned up over the next few days after it has been finished.

Google Chrome Beta Review

When Google Chrome came out I instantly downloaded and installed it to see what the big deal was. Here is an optimistic look at Google Chrome, past the possible security issues with the browser and the general distrust of Google around the internet at the moment.

Performance
The performance of Google Chrome is amazing. I didn’t think there would be much improvement in day to day browsing, but the speed increase from using Internet Explorer and Firefox is quite noticable. The other noticable speed increase from these browsers is in the speed that Google Chrome can open and close, on my PC the browser window opens instantly and is able to be used in a few seconds, Firefox depending on what plugins you have install, what theme you are using, at the quickest you normally can’t get it under 3-5 seconds unless you are doing some major tweaking. Google Gears integration also helps on websites that are compatible with it, such as the WordPress Admin section.

Stability
There were many reports of Google Chrome crashing when It was first released, I never experienced anything like that, in fact I have only ever experienced 1 crash and it appeared to be caused by a specific website that I had never been to before and had no interest in going to again. However, I do experience problems with Google Chrome suddenly losing the ability to produce sound, it happens with YouTube the most often and usually occurs when I have many tabs open.

Compatibility
This is not quite a strong side of this browser yet, flash is supported and works great, however Java support is flaky to say the least. Java 1.6 Update 7, the latest stable version of the Java Runtime Environment is not compatible with Google Chrome yet, however Java 1.6 Update 10, currently in Beta is apparently compatible, however I have had no luck with it on my PC, it stops Java applets running in any browser when it is installed, this may be due to a previous (working) installation of Update 10 being removed a few months ago, however I have had no success with the version that worked previously. Other users of Update 10 have also experienced a wide range of problems specific to Google Chrome, so although the latest Beta of the runtime environment is listed as compatible the chances of getting it to run correctly aren’t too good yet.

Obviously your favourite FireFox plug-ins are not compatible with Google Chrome Chrome Plugins seems promising in the future and has some good information so far. Theme support appears to be built into Google Chrome but not much has been done in that area yet.

As far is website compatibility goes Google Chrome has no major issues, I have rarely come across a website that cannot display properly in this browser.

Features
Google Chrome has many features that interest me, the One Unified Box (Address Bar) is very handy, normally I’d have to choose which box was active before I started typing, this was annoying when I started typing somewhere and had to move it to the right area, the lack of recently typed URLs is annoying, but that can be accessed from the New tab page, this lists the most common websites that you have visited and is used to access the history list, the list is set out well and the readability is great.

I have not yet used the application shortcuts, but they seem fairly simple to use. The dynamic tabs are fun to use, they allow you to drag a tab out of the window to create a new window with the current tab’s contents. A common feature starting to come out in browsers now is the ability to hide your history, cookies etc for a session, Chrome’s Incognito Mode is very similar to other types of this feature.

Google Chrome also warns about malware and phishing websites, I haven’t ran across this yet. The downloads bar is a little annoying and it took a bit of a look through the settings to get it to not forget the folder I last downloaded to.  The settings importer was automatic at the end of the installation, but can also be invoked from the menu as well, it worked flawlessly for me, cookies and favourites were imported exactly as they were in FireFox.

Look & Feel
Google Chrome looks and feels very polished, in Vista the glass border is familiar to those that use Internet Explorer, the tabs are in an interesting place, apart from having to remember that they are not in the standard spot I really didn’t notice anything good or bad about them being at the top. The bookmarks are fairly hidden when you first start using Chrome and I had to add the Bookmarks bar so that I remembered how to get to my imported Bookmarks, they are listed under Other Bookmarks and don’t appear to be accessible unless you always show the bookmarks bar.

As I stated in the compatability section I have not had many issues with page rendering, also I have not experienced any rendering issues with the browser itself, the UI is smooth and gets familiar fast.

Conclusion
As I touched on at the start, this is probably not the browser for you if you are paranoid or have any distrust of Google, also If you don’t have a good virus scanner installed and/or you blindly allow executables to run you may be put off by the possible security flaw regarding launching executables.

Google Chrome is a polished browser that is fast and works great, it has no plugins that I am aware of yet and that stops most adopting it as their default browser, but if you’re not worried about that the speed and features certainly helps productivity while browsing. I use Google Chrome for most of my browsing, however if I feel like doing some stumbling or need to use Java I will run FireFox.

Firefox crashes, WordPress flash uploader and new host

Firefox has locked up again

Firefox has crashed again, I can always tell because It’s closed, in fact I probably closed it an hour ago, but it’s been slowly sitting there in the background hoping I won’t notice it, it does this occasionally when I close it, sometimes after I have used it for some time, sometimes when I only have it open for a short time, it doesn’t seem to matter, it just does it, further more I haven’t found anybody with a similar problem, except some sources that insist it might be the plugins causing it.

The WordPress flash based picture uploader has been giving me grief ever since I changed hosting providers recently, HTTP error was all I was given when trying to upload a file, using the browser based uploader worked fine so I used that instead, but it got annoying for me so I did a bit of googling and found out that the reason it wasn’t working is because on some providers you must have this directive in your .htaccess file:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

Now flashed based uploading works fine.

UPDATE: James at The Theme Blog has experienced a similar error and has posted another workaround here, if this doesn’t work out try that one.

I have been a member of Aussiehost for over 6 months now, however this site has stayed specifically on Servage up until a few days ago when I realised this website is a little slow on Servage for my liking, the latency is shocking. The changeover was seamless and I’m very happy with the performance so far.

Google Suggest/Trends, theme editing, FileZilla issue

http://www.google.com/webhp?complete=1&hl=en
This is now my homepage, it is extremely handy, plus it’s slightly less bloated than the default Firefox search page, trends http://www.google.com/trends is quite interesting to have a look at as well.

Thanks to http://www.blogohblog.com/, http://www.dyers.org/blog/archives/2008/05/21/how-to-add-avatars-to-your-wordpress-25-theme/ and Jason I was able to fix some issues I was having with the Gravatar section of the theme which is by default not supported, the code at first didn’t work I figure because it was incorrectly detecting the WordPress version as something less than 2.5 however there was a </div> that had no starting tag which caused the theme style to get messed up also, after fixing those the Gravatars work fine now.

I have been experiencing a ‘DDE execute request failed’ error in FileZilla 3 when choosing to view/edit files regardless of the fact that it does appear to view/edit the file perfectly fine, there doesn’t appear to be any information that I can find about it when searching around.
I managed to stop it appearing by setting a default text editor, choosing ‘Always use default editor’ and unchecking ‘Inherit system’s file-type associations’, must be a Vista/FileZilla/TextPad/UAC thing.

I received my Windows Vista upgrade advisor shirt not long ago, it’s very well made but I don’t think I’ll be wearing it anywhere anytime soon.

I just found out what a post slug is…