evion 0 Report post Posted January 29, 2005 I was just wondering if lets say a site viewed on Internet Explorer seems perfect but when viewed on other browsers will look horrible and disoriented, is there a code which i can use so as when the "index.htm" site detects a Mozilla browser for instance then it will automatically redirect to another webpage designed for that certain browser.If there is such a code or if someone can code it, I will greatly appreciate it. Thanks Share this post Link to post Share on other sites
NilsC 0 Report post Posted January 29, 2005 The little I know about it I'm trying out CSS and the different "hacks" used to get non compliant IE to display the webpage correctly. If you create the website for a "w3c" compliant browser then it will show correctly in those browsers and the code will most likely be correct in newer versions released of the same "w3c" compliant browsers. IE may be compliant some time this century I use a lot of the tips and tricks on w3schools I think it's easier to write for the compliant browser and use the hacks to make it look good in IE than to write 2 different websites for 2 different browsers. Then what do you do if they use opera or a text reader? Nils Share this post Link to post Share on other sites
evion 0 Report post Posted January 29, 2005 Hmm...that makes sense. Thanks for the website recommendation, I've found info there that i never really thought of before. For this redirect problem i might put a link to another webpage for other browsers. Share this post Link to post Share on other sites
Hercco 0 Report post Posted January 29, 2005 The best way, in my opinion is to do this with PHP and then either include a page suitable for the browser or redirect. It is in fact really easy to to. The global server variable $_SERVER['HTTP_USER_AGENT'] contains string form the HTTP request telling the browser. To check which browser it is, you should use regular expression (with ereg() ) or a function like strpos(). Internet explorer can be identified from a string MSIE. It is also wise to check that it is not just some other browser (like Opera for example) disguising itself as IE. The HTTP_USER_AGENT that Opera sends also contains string "Opera". Share this post Link to post Share on other sites
miCRoSCoPiC^eaRthLinG 0 Report post Posted January 30, 2005 The best way, in my opinion is to do this with PHP and then either include a page suitable for the browser or redirect. It is in fact really easy to to. The global server variable $_SERVER['HTTP_USER_AGENT'] contains string form the HTTP request telling the browser. To check which browser it is, you should use regular expression (with ereg() ) or a function like strpos(). Internet explorer can be identified from a string MSIE. It is also wise to check that it is not just some other browser (like Opera for example) disguising itself as IE. The HTTP_USER_AGENT that Opera sends also contains string "Opera". <{POST_SNAPBACK}> Good method - but instead of designing multiple copies of the same page - it'll be more efficient if you use style-sheets. For say 3 different browsers, make 3 stylesheets and use php to make the same page load a different style-sheet in each case depending on the browser. It works !! Share this post Link to post Share on other sites
webguide 0 Report post Posted February 3, 2005 What software do you use for creating your webpages? Whenever I make webpages I use dreamweaver because it is built to be w3c compliant. For example it tells you what CSS features are available for any particular browser. Very useful Share this post Link to post Share on other sites
spacewaste1405241471 0 Report post Posted February 3, 2005 Yes webguide that is completly correct infact...Dreamweaver if I'm not mistake can even edit the pages to help you make them w3c compliant which would be really helpfull in a situation like this...But when you try to make something compatible for all three types of browsers...You might have to remove some features....So maybe designing three different types might not be sucha bad idea?... Share this post Link to post Share on other sites
webguide 0 Report post Posted February 4, 2005 I cannot think of any feature that is both useful and unsupported by all three browsers. Share this post Link to post Share on other sites
chiiyo 0 Report post Posted March 15, 2005 Hmm, just a quick question here: If you have the same page, and three different designs by using three different css stylesheets, would it really solve the problem? I'm confused because I thought the browsers don't display a page properly because of the original html coding in it, and if css only changes the appearance of the page, how is it that a page that looks bad in one browser can look better with a change of css? Does that in fact mean that css is part of the reason why the browser screwed up in the first place??I know my question is a bit loopy-going-around-in-circles... A bit blur about this. Share this post Link to post Share on other sites
hihihihi88 0 Report post Posted March 28, 2005 Good method - but instead of designing multiple copies of the same page - it'll be more efficient if you use style-sheets. For say 3 different browsers, make 3 stylesheets and use php to make the same page load a different style-sheet in each case depending on the browser. It works !! <{POST_SNAPBACK}> Wowwwit is a good solution , I also facing this problem of my website ..>.< now I try to slove it . Share this post Link to post Share on other sites
sirknight 0 Report post Posted May 12, 2005 Yes, its really possible but you need a tedious study to learn all web browser technology..Nevertheless, you all also need to learn the CSS for all kind of browser. Share this post Link to post Share on other sites
rjgentry 0 Report post Posted May 24, 2005 my solution is to be a pain..just build your site for the browser you want...down with everyone else!!! hahahhah (sinister laugh)... Share this post Link to post Share on other sites
hazeshow 0 Report post Posted May 24, 2005 It's not necessary to use PHP (to have a PHP server), you could also use Javascript to find out the visitor's browser and to do certain actions: <script LANGUAGE="JavaScript"> <!-- if(navigator.appName == "Netscape") {alert("You are using Netscape Browser! Please go and install Microsoft Internet Explorer. This site looks better if you do so! :-)")} //--> my solution is to be a pain..just build your site for the browser you want...down with everyone else!!! hahahhah (sinister laugh)... <{POST_SNAPBACK}> Absolutely right! Keep one thing in mind: it's YOUR site! GreetingZ Share this post Link to post Share on other sites