Force IE to use the latest engine

If by some unknown reason IE8/9/10 are rendering your site in compatibility mode, ie IE7 mode or something lame like that, just force it to use the latest engine available:


note that the code added right before the doctype declaration. the using_ie() boolean function below (credits to Simeon for this solution: http://www.php.net/manual/en/function.get-browser.php#101314)

function using_ie() 
{ 
    $u_agent = $_SERVER['HTTP_USER_AGENT']; 
    $ub = False; 
    if(preg_match('/MSIE/i',$u_agent)) 
    { 
        $ub = True; 
    } 
    
    return $ub; 
} 

FIX: Sites not working in IE7, IE8 CO

Recently I had to fix a site that was not being displayed correctly in IE8. Turned out that some of the DOM was written by Javascript, and IE8 on client’s machine was not displaying parts of the page. At first i was not able to replicate the issue on a clean XP SP3, with IE8, but then after i disabled javascript i got the same effect as the client. Thought the solution was easy, assumed the client has JS disabled, but it turns out JS was enabled.

After closer investigation, the only difference between my IE8 and client’s IE8 was a CO, installed using IEAK8 (corporate shit) and it had by default native XMLHTTP disabled. Translated: jQuery was assuming the browser is IE6.

To fix this issue, enable XMLHTTP in IE7, or IE8

1. Open IE8
2. Go to Tools -> Internet Options -> Advanced
3. make sure "Enable native XMLHTTP support" is checked
4. Save

Fix Firefox 4 beta not displaying images on certain sites.

I’ve switched for a while to FF4 beta and i’ve noticed that on certain sites the images don’t load properly. They ofcourse load just fine on other browsers (chrome, opera).

Turns out it’s a FF4 setting and here’s how to fix it:

1. Type “about:config” in the location bar, and press ENTER.
2. In the filter box, type “referer” and press ENTER. This should
leave you with one preference, “network.http.sendRefererHeader”. This
is probably set to 0.
3. Right click on network.http.sendRefererHeader and select “Modify”.
4. In the dialog that appears type “2″ and press OK.
5. Restart your browser.

Google Chrome for Linux and Mac with CrossOver Chromium

Two weeks ago i have posted a tutorial on how to make Google Chrome run on Linux using wine. That gave Linux users the option to test the browser without having to go to a Windows machine, but it was not perfect as it lacked HTTPS support.

CrossOver packaged for both Linux and Mac the browser and it supports HTTPS. Check it out at: http://www.codeweavers.com/services/ports/chromium/

Note that this package does NOT play flash files. In order to get flash pages to play you just have to go to http://www.adobe.com and install the flash player as if you were running windows.

Install Google Chrome on Linux using wine

Google launched a few days ago a new web browser, that has some interesting features which might give FF 3, Safari and IE8 a run for their money. Although not yet for Linux, i’ve put together (following some ubuntuforms posts) a detailed tutorial to help you Install Google Chrome on Linux using wine >= 1.1.3.

1. install wine (follow the official instructions http://www.winehq.org/site/download-deb)

2. make sure wine >= 1.1.3 is installed by entering the following in the terminal
wine –version

3. Download winetricks and install it
wget http://www.kegel.com/wine/winetrickssudo cp winetricks /usr/sbin

4. Install some dependencies for Chrome (Flash is not mandatory but will allow you to play youtube videos :-))winetricks riched20 riched30 flash
4.1 Install allfonts (this is optional)
winetricks allfonts

5. Download the Chrome installer
wget http://gpdl.google.com/chrome/install/149.27/chrome_installer.exe

6. Install Chrome (just follow the onscreen instructions and make sure you create a desktop icon)
wine chrome_installer.exe
google-chrome-linux-1.png

7. After the install is finished, you won’t be able to use Chrome as it needs a bit more hacking. Just close it and opent with your favorite editor the Google Chrome.desktop icon created on your Desktop. Make sure your add “–new-http –in-process-plugins”, without the quotes at the end of this line:

Exec=env WINEPREFIX=”/home/mimir/.wine” wine “C:\windows\profiles\mimir\Local Settings\Application Data\Google\Chrome\Application\chrome.exe”

to make it look like this:
Exec=env WINEPREFIX=”/home/mimir/.wine” wine “C:\windows\profiles\mimir\Local Settings\Application Data\Google\Chrome\Application\chrome.exe” –new-http –in-process-plugins

Save the file!

NOTE: mimir is my username, you will have something like /home/yourusername/.wine

8. Go to desktop and start Google Chrome

google-chrome-linux-2.png

Checking some youtube videos 🙂

google-chrome-linux-flash.png

HTTPS Note: it seems that the https is not working due to the fact that wine is missing TSL/SSL features, the dlls that should handle that being just stubs at the moment. If you have any information regarding this, please share.

Resources:
Wine appdb page for Chrome
http://ubuntuforums.org/showthread.php?t=908493
Install Google Chrome On Mac OS X using wine