Forum Moderators: open
I was sent a screen shot, and it looked pretty bad.
Is there anyway I can get a Safari mirror program for a PC?
Or are there any non-mac browsers that render pages like Safari.
However whilst Safari uses the same KHTML rendering engine as Konqueror, differences remain: so to be certain, you will still need to test in Safari, which is not available for anything other than a Mac. There are a few services available which offer screenshots of your site in different browsers, but this won't verify functionality - it is just a visual check.
My question was, Is there a way to specify a separate stylesheet for only one browser (SAFARI on Mac), while letting all other browsers (IE, Firefox, Netscape, etc.) use the current/default stylesheet?
<script type="text/javascript>
ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("safari")!=-1) {
document.write('<link rel="stylesheet" href="yoursafari.css" type="text/css">')
}
</script>
Also, you could use an "else" statement to write in the default.css for the rest of the browsers, but that would keep all browsers with js turned off from getting any stylesheet.
I wouldn't worry too much about user agent switching in this case:
1. The user knows if they've done it
2. Safari is already a small percentage of the browser universe, and those who switch user agent would be a small percentage of a small percantage
[edited by: tedster at 5:11 pm (utc) on July 28, 2005]
This means that the 100 series Safari browser can roughly be considered to equal the Konqueror that comes on the newer live kde linux cds, 3.3 or 3.4, but the 3 and 400 series of Safari will be significantly different. Safari has already passed the CSS acid test, although that was an experimental prototype version, KHTML isn't remotely close to that.
Because Safari is just one mac product that uses applewebkit, it's safer to detect for applewebkit than safari, and it's definitely safer to test using server side scripting than javascript.
That means an uptodate linux livecd distro will do the trick, usually either kubuntu or kanotix are very recent versions, haven't checked out kde 3.4 yet though. One of those two will usually handle the hardware of your computer just fine, just grab both and see which works better.
If safari and konqueror are more or less remaining similar, detecting for 'khtml' is the safest way to go I think.