Forum Moderators: open

Message Too Old, No Replies

Page Change

         

techoveride

5:48 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



I would like to know how to change what page loads on my site depending on if the user is using Firefox or IE.

encyclo

6:53 pm on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You have two options, each based around the same idea: reading the "user agent" string (a header sent with every page request by the browser which identifies the browser type and version). You can parse the user agent string with Javascript and use document.write to add an appropriate stylesheet or redirect the user to a different page, or you can use a server-side language such as PHP or ASP to read the string and include the appropriate file for each browser.