Showing posts with label browser. Show all posts
Showing posts with label browser. Show all posts

Wednesday, 7 January 2009

Everything you know about CSS is wrong

Well, lots of people have been talking about this book.
You can read a chapter here.
And a review by Martin Heller here.

A big thumbs up for CSS tables, way to go! :)

Thoughts?

Friday, 5 September 2008

Google Chrome - user-agent (UA)

For anyone interested in browser detection, here is Google Chrome's "useragent" string:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13

You can get it by simply typing "about:" in the omnibox ("address" bar)
or alternatively by adding the following to your <head> section.


<script language="javascript">
function showUA()
{
userAgent = navigator.userAgent;
alert("UserAgent: " + userAgent);
}

window.onload=showUA;
</script>



So something similar to the following could be used to detect which browser you are using:


<html>
<head>
<script language="javascript">
function setBrowser()
{
var browser="unknown";
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf("opera") > -1)
browser="Opera";
else if (userAgent.indexOf("konqueror") > -1)
browser="Konqueror";
else if (userAgent.indexOf("firefox") > -1)
browser="Firefox";
else if (userAgent.indexOf("netscape") > -1)
browser="Netscape";
else if (userAgent.indexOf("msie") > -1)
browser="Internet Explorer";
else if (userAgent.indexOf("chrome") > -1)
browser="Chrome";
else if (userAgent.indexOf("safari") > -1)
browser="Safari";

var brDiv=document.getElementById("browser");
brDiv.innerHTML="<b>" + browser + "</b>";
}

window.onload=setBrowser;
</script>
</head>
<body>
You are using:
<div id="browser"></div>
</body>
</html>


If you are using one of those popular browsers its name should show up in the empty "browser" div in the body section. Note that the order of the tests is critical. For instance, both Opera and Netscape useragent strings contain "msie" so it is necessary to test for those browsers before testing for Internet Explorer.

Of course the above script is certainly very basic and we could take things a step further and not only retrieve browser name but also browser version for instance, or test for other things like whether the browser is Java-enabled, which Javascript version is available, which Flash Player version is installed or which operating system is being used.

Let me just share a couple of links which cover this more comprehensive approach to Javascript browser sniffing:
Browser sniffing: takes an in-depth look at how to sniff all major and lots of minor browsers.
JavaScript Browser Sniffer: the "ultimate" mainstream browser detection script.

Have fun!

Wednesday, 3 September 2008

Experimenting with Google Chrome

(Thank God for work and the XP box there!)

I have downloaded, installed and survived the Google Chrome experience.

As far as I can tell it really lives up to expectations: on first impression its user interface is very nice and crisp, the browser is fast and renders nicely.

It's definitely usable "as-is" and despite being beta could probably replace any browser for day-to-day browsing except perhaps in some rather specific cases which some have been reporting.

Feature-wise, you can seamlessly extract a tab to a new window or reassemble tabs located in separate windows into a single window.

The developer tools are another cool feature. It would be really nice if you could snap them into your current tab though (or have the "snap-in" appear in every tab once you open it). For the moment, the tools open in an new window which stays on top of everything you are doing in the browser and I found it was a major distraction (compared to using Firebug in Firefox for instance).

Last but not least, the "omnibox" in every tab is a really nice feature which I shall probably learn to miss in other browsers.

Well, that's it for now. As you can tell I didn't really have the chance to take it for an in-depth test run and look at security features for instance.

It will be interesting to see whether Google's new approach actually causes any disruption on the browser market.

What do you think?

Tuesday, 2 September 2008

Aaaaaaaaaargh

Just one simple question... (*sobs despairingly*)

When (if ever) will Google Chrome become available to Win2k users?

Google Chrome

So Google has been at it again with this new very engaging project: Google Chrome, an open source web-browser with lots of impressive ideas with regard to stability, speed, security, standards and much, much more.

I have heard the site to keep an eye on today for a fresh copy is:
http://www.google.com/chrome

If you are interested, there is an nifty explanatory comic book by Scott McCloud at:
http://blogoscoped.com/google-chrome/

In it, the Google Chrome project is detailed from several angles, plus you get to 'meet' lots of people who are working on the project. Their take was basically to create a browser which would be more in line with today's web applications (coming at it from a very different angle than when browsers were used to process plain web pages, with little or no: DOM manipulation, AJAX scripts, etc.).

  1. Stability, testing and multi-process architecture:
    Using processes instead of threads to improve stability and prevent memory bloat as well as building on other Google tools to improve test efficiency.

  2. Speed: Webkit and V8:
    Increasing speed and efficiency by using Webkit and a high-performance javascript virtual machine called V8.

  3. Search and user experience:
    Changing the tab controls and their uses; introducing the omnibox, elegant inline completion and improved popup handling; improving user experience with a compelling "new tab" page which holds the most visited pages and search sites.

  4. Security, sandboxing and safe browsing:
    Preventing attacks by sandboxing (jailing) each separate process and helping users to avoid phishing scams using up-to-date blacklists of harmful sites.

  5. Gears, standards and open source:
    Using gears to improve developer experience, complying with standards (and perhaps setting new ones?), and of course sharing.



All of this really sounds very impressive, it seems Google is simply always that one step ahead of everyone else!

More news about whether this was all too good to be true, once I actually get to try it out, which I hope will be very soon :-)

Thoughts for now?

Saturday, 5 July 2008

Browser Security

Ryan Naraine discussed a recent study about browser security in a recent article.

Before we start let's point out the following:

The entire report is a valuable read on the state of browser security but, as Brian Krebs points out, the conclusions should be considered conservative since it does not include information on vulnerable plugins (think Flash Player, Adobe Reader, Java, QuickTime, etc). Also, bear in mind that these numbers only represent Google users.

So we're really talking specifically about the browser applications and not the browsing experience as a whole.


We discovered that at most 83.3% of Firefox users, 65.3% of Safari users, 56.1% of Opera users, and 47.6% of Internet Explorer users were using the latest most secure browser version on any day between January 2007 to June 2008. For the latest version analysis of Safari, we only considered the date range Dec 2007 to June 2008, when Safari version 3 became widespread.

I suspect Internet Explorer's surprisingly bad results are due to poor adoption of the browser's latest version IE7. And this will be linked to:
- people who can't upgrade to IE7 because their system requirements cannot be met (e.g. anyone running Win2000);
- people who won't upgrade to IE7 because they found it changes their browsing experience too much (e.g. too different from the user perspective: tabs, new menus, etc. and/or technical issues: breaks current web-based applications which need to be upgraded to ensure IE7 compatibility).

I must say of late Microsoft upgrades have entailed lots of extra unexpected technical work. Just think back to XP SP2 (a real pain in the neck). These new systems require security tweaking everytime - it's no wonder companys and users are slowly changing their ways and going for backward-compatible and standard compliant systems.

And it makes me wonder. Should large corporations be allowed to make application upgrades which will affect everyone actually developing anything for use with said application? Aren't systems today being designed to be so secure at the user's expense, making them difficult to use? Is it not actually counterproductive if users just get annoyed and frustrated with over-secure systems (esp. as these systems are still vulnerable to attacks anyway)?

Perhaps we should just turn to some form of mandatory training about the risks posed by accessing the Internet, how to reduce these risks and how to recognize certain types of attacks/infections, and how to check systems for known infections.

What do you think?
Online Marketing
Add blog to our blog directory blog search directory Blog Directory Blogarama - The Blog Directory