Welcome to WebmasterWorld Guest from 18.207.136.184

Forum Moderators: open

Message Too Old, No Replies

Code in Firefox vs. Safari? Any major differences?

firefox safari code comparison issue

     

sushidub

9:47 pm on Mar 4, 2006 (gmt 0)

Inactive Member
Account Expired

 
 


I'm trying to find an example of code that works correctly in Firefox but not in Safari. Can be CSS, HTML, and or Javascript. I've searched everywhere to try and find an obvious answer (browser comparision charts..etc.) and can't seem to find a simple straight-forward answer of something that is 'known to work' in Firefox but not in Safari. I'm not talking about bad code either.
Thanks in advance -
2:40 am on Mar 9, 2006 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9074
votes: 6


Welcome to WebmasterWorld sushidub!

There are no major differences between Firefox and Safari as both browsers strive to follow the W3C specifications as closely as possible whilst still rendering legacy content correctly. Both use doctype switching, both support almost all of CSS2 (Safari was the first browser to pass the Acid2 test), both tend not to support proprietary MS extensions to CSS or Javascript.

If you want a list of bugs currently affecting Safari, you should check out the WebKit development website:

[webkit.opendarwin.org...]

10:52 am on Mar 9, 2006 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 26, 2004
posts:3178
votes: 22


I go bonkers dealing with Safari!

First off Safari does not support changing classes via JavaScript. This means Safari suffers this as a major bug when viewing my site; found out it still has not been fixed in the latest version I've tested at a nearby Mac store.

Also take a look at Safari's useragent...

Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/417.9 (KHTML, like Gecko) Safari/417.8

Besides the fact that it identifies itself as the Mozilla browser (which will never reach 5.0 since Mozilla 1.7x was the version before it morphed in to SeaMonkey) it also identifies itself as Gecko! This is EXTREMELY obnoxious and forces Gecko detection to depend on "rv:" string.

It also does not support JavaScript that writes a link element to the head of an HTML file that I use for changing stylesheets.

Since I do not have a Mac I can not test Safari out to greater extents.

Gecko and Presto continue to be the best rendering engines.

Thanks for the link encyclo, they will be hearing from my shortly. ;)

John

1:24 pm on Mar 9, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Aug 11, 2005
posts:386
votes: 0


...something that is 'known to work' in Firefox but not in Safari. I'm not talking about bad code either.

There plenty of HTML/CSS techniques that work in Firefox but not Safari, but most of them are indeed caused by the fact that Safari has a more strict approach to standards. Would you qualify that as "bad code" on the part of Firefox? I don't know that I would necessarily, but I suppose the case can be made that if you CAN write the code so that it works in Firefox AND Safari, then failing to do that is bad coding.

May I ask why you want to know? If you're planning on writing a Safari-bashing (or Firefox-bashing) essay or something, I guess I can see the point. I don't know that you'll get a reputable answer without divulging your agenda.


JAB: It's surprising to me that you find Safari to be inferior with its approach to Javascript... I've always found Firefox (especially pre-1.5) to be the worst to deal with of all the browsers for JS. Not challenging your statement, just nominating the idea that every browser has its own shaky points with JS.

6:55 pm on Mar 9, 2006 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 26, 2004
posts:3178
votes: 22


Thanks for the tact, perhaps it's just this one script of mine thats just simply not supported yet? Our approachs to scripting will probally be a bit different anyway.

I'm not saying Firefox is the best with JavaScript; that would be Opera in my opinion save it's inability to support flash/javascript interaction.

The JavaScript in question that changes classes would not let me use my own site at the Mac store but in other regards I don't know.

John

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members