Apple Safari and Dotnet

E

Edward

Hi All,

I feel frustrated with one of my Customers who wants me to ensure that a
dotnet web site I am building for them must be compatible to Apple's Safari
browser!

Safari is buggy and it does not support lots of things (xhtml etcc).

However, what puzzles me is that there are some dotnet Framework 2 web sites
out there that work perfectly well under Safari, whereas my website does not
while it is a simple one! I don't know what I am doing wrong and how those
sites manage to work ok.... so obviously Safari is not a limitation for
dotnet framework V2.

Is anyone able to explain to me if there is something that I can do to
ensure my site works under Safari?

Thank you so much.

Edward Re
Melbourne Australia
 
C

Chris Fulstow

Can you give more specific information about how your application is
failing in Safari, and which controls you have used?
 
E

Edward

Hi Again,

I forgot to mention that my dotnet framework V2 web site uses the plainest
and simplest dotnet code (no javascript nor vb script) yet, it still FAILS
to render corrently under Safari! Looks like Safari does not handle too well
the <DIV> element!

thanks for your precious feedback

Edward
 
M

Mark Rae

I feel frustrated with one of my Customers who wants me to ensure that a
dotnet web site I am building for them must be compatible to Apple's
Safari browser!

I feel your pain! I went through precisely the same thing about a year
ago...
Safari is buggy and it does not support lots of things (xhtml etcc).

Actually, it isn't, and it does - you just have to know how...

That said, neither Safari nor Camino support styles on buttons - no-one has
ever been able to explain to me why this is!
However, there's no point trying - styles on buttons are simply ignored by
Safari and Camino.
However, what puzzles me is that there are some dotnet Framework 2 web
sites out there that work perfectly well under Safari, whereas my website
does not while it is a simple one! I don't know what I am doing wrong and
how those sites manage to work ok.... so obviously Safari is not a
limitation for dotnet framework V2.

Again, it's not the Framework per se...
Is anyone able to explain to me if there is something that I can do to
ensure my site works under Safari?

1 ) Choose the webpage which looks the worst in Safari :)

2) Add the following code to the page's Page_PreInit method:

if (Request.Browser.Browser.Contains("Safari"))
{
this.ClientTarget = "uplevel";
}

How does it look now...?
 
E

Edward

sure.... if you have a look at http://www.gbab.net/ under Safari the
alignment of the <DIV>s to the right of the sidebar and the footer are all
over the place! The site looks super under Internet Explorer though!

Is any other info that I can provide for our investigation?

thanks for your time on this

Ed
 
E

Edward

Hello Mark,

I have made the change to the Pre Init method but I will have to get into
work first to test it, as I do not have a Mac here at home where I am now!
Here in Melbourne Ausrtalia it's close to 1AM, so I'll need to wait a few
hours to see if it works .....

I am keeping my fingetrs crossed that it works .... and if it does .... I'll
be a happy chappy! :)

More to come.

Cheers

Ed
 
E

Edward

I tried the code below and while it has improved the look and behaviour of
the menu control, the DIVs are still misbehaving:- they overlap whereas they
should lay one next to the other!

I would have thought Safari could understand DIV's being old contructs!

Help?

thanks

Ed
 
M

Mark Rae

I tried the code below and while it has improved the look and behaviour of
the menu control, the DIVs are still misbehaving:- they overlap whereas
they should lay one next to the other!

I would have thought Safari could understand DIV's being old contructs!

Hmm - Safari is *VERY* XHTML

1) Are you writing your markup to XHTML-compliant standards and are you
using VS.NET 2005 to validate your markup properly?
Tools, Options, Text Editor, HTML, Validation, XHTML 1.0 / XHTML 1.1

2) Have you run your rendered markup through the XHTML validator?
http://validator.w3.org/
 
E

Edward

Hello Mark,

NO LUCK! I have made the page (www.gbab.net/zTest3.aspx) to be XHTML 1.0
compliant transitional using the http://validator.w3.org/ check syntax
parser and the necessary adjustments. I have also used the pre_init code
(this.ClientTarget = "uplevel";) HOWEVER the DIVs are still looking bad!

I don't understand why!

Maybe Safari does not apply the CSS properly to the DIVs.

I am determined to resolve this mystery though, I will keep on trying
different things.

Meanwhile, I appreciate immensely your help.

Edward
 
M

Mark Rae

NO LUCK! I have made the page (www.gbab.net/zTest3.aspx) to be XHTML 1.0
compliant transitional using the http://validator.w3.org/ check syntax
parser and the necessary adjustments. I have also used the pre_init code
(this.ClientTarget = "uplevel";) HOWEVER the DIVs are still looking bad!

I don't understand why!

Maybe Safari does not apply the CSS properly to the DIVs.

I am determined to resolve this mystery though, I will keep on trying
different things.

Meanwhile, I appreciate immensely your help.

A couple of things:

1) The test page too nearly TWO MINUTES to load! I appreciate that we're at
opposite sides of the globe, but that's ridiculous!

2) I (eventually!) loaded the test page in Safari, FireFox, Netscape and
Opera on the Mac, and they looked pretty much identical - what ever
rendering problems you think you have are not specifically related to
Safari, at least, not on my Mac Mini...
 
E

Edward

1) The test page too nearly TWO MINUTES to load! I appreciate that we're
at opposite sides of the globe, but that's ridiculous!
the page is hosted with www.gate.com ...... and they are in Miami, Florida!

I pay $US 9 a month and they overload their server by letting too many
people on ... one of these days I will have to find a better hosting
provider!

thanks
 
E

Edward

I get 1 Gig of disk space and 100 megs of sql server 2005 storage... that is
why I got hooked!
 
M

Mark Rae

I get 1 Gig of disk space and 100 megs of sql server 2005 storage... that
is why I got hooked!

Wow! All that disk space and database storage...

I'm sure that'll be of great comfort to the people browsing your site while
they're waiting forever for your pages to load...
 
E

Edward

Hi Mark,

I was validating http://www.gbab.net/default.aspx with the error:-
Error Line 86, column 110: required attribute "alt" not specified .


The problem is that the original Dotnet source code being:-
<asp:Image ID="Image1" runat="server"
ImageUrl="App_Themes/Ed/Images/gbab_writing.gif" />

got translated to :-

<img id="ctl00_Image1" src="App_Themes/Ed/Images/gbab_writing.gif"
style="border-width:0px;" />Without the ALT element. But it's not possible
for me to specify the ALT element in the ASP Image control, as it is not
part of the ASP syntax.

The solution is that I can always use the <img> rather that <asp:Image>
however I am surprised that the <asp:Image control is not XHTML 1.1
compliant.

Thanks

Edward Re
Melbourne - Down Under
 
M

Mark Rae

I was validating http://www.gbab.net/default.aspx with the error:-
Error Line 86, column 110: required attribute "alt" not specified .

The problem is that the original Dotnet source code being:-
<asp:Image ID="Image1" runat="server"
ImageUrl="App_Themes/Ed/Images/gbab_writing.gif" />

got translated to :-

<img id="ctl00_Image1" src="App_Themes/Ed/Images/gbab_writing.gif"
style="border-width:0px;" />

Well, it would do... That's what you wrote...
Without the ALT element.

Again, ASP.NET is doing exactly what you told it to do...
But it's not possible for me to specify the ALT element in the ASP Image
control, as it is not part of the ASP syntax.

I really think you should consider going on a beginner's course to ASP.NET
to learn the basics, otherwise you're going to continually come up against
this sort of problem due to fundamental lack of knowledge of the development
tools you're trying to use.
The solution is that I can always use the <img> rather that <asp:Image>

No - the solution is to specify he AlternateText property of the <asp:Image>
tag...

<asp:Image ID="Image1" runat="server"
ImageUrl="App_Themes/Ed/Images/gbab_writing.gif" AlternateText="RTFM" />
 
E

Edward

I really think you should consider going on a beginner's course to ASP.NET
to learn the basics, otherwise you're going to continually come up against
this sort of problem due to fundamental lack of knowledge of the
development tools you're trying to use.
good point, but I am not earning enough to afford one at the moment. I lost
my job recently when my IT role went to an Indian IT provider (Infosys)! The
web site I was having problems running it under Safari for a charity
organization ..... I got no money for it...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top