Conditional Includes

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

I'm using sever side includes on my site now, but as of right now the include template doesn't work on older browsers. I do get a few people coming to the site using NS 3 or something, so I'd like to be able to set it up so that it works for them.

How do I set it up to include a different file depending on the browser version? What's the best way to do it?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

what kind of file are you including?

You could include a CGI file and then determine the browser. Then require() or include() the right file.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.