>
> Der må være noget UA-sniffing involveret et sted.
Da siden blev introduceret i begyndelsen af januar havde brugerne med IE8
store problemer med at åbene specifikke sider. Admin af siden anbefalede
FireFox og Google Chrome som et must!
Uden at gøre mig klog på problematikken, så tror jeg, at I er inde på
noget rigtigt her. Jeg har prøvet at forstå, hvad UA udretter på baggrund
af denne tekst, som jeg har opsnappet et sted på nettet:
Client-side sniffing
Web pages can use programming languages such as Javascript which are
interpreted by the user agent, with results sent to the web server. For
example, here is a piece of code that might be used to determine whether
a user is viewing a web page with Internet Explorer:
<script type="text/javascript">
var isIE = window.ActiveXObject ? true : false; // ActiveX is only used
in Internet Explorer
</script>
This code is run by the client computer, and the results are used by
other code to make necessary adjustments on client-side. In this example,
the client computer is asked to determine whether the browser can use a
feature called ActiveX. Since this feature is proprietary to Microsoft,
Inc., a positive result will indicate that the client is running
Microsoft's Internet Explorer.
Server-side sniffing
Client-side sniffing makes use of features on the client computer. These
features must be available and active in order for the process to work.
However, since the web server has no control over whether the client
actually has the features available, client-side sniffing is unreliable.
It is possible, however, to determine many features of the browser
without depending on the client configuration. The web server
communicates with the client using a communication protocol known as
HTTP, or Hypertext Transfer Protocol. Information communicated between
client and server usually includes information about the browser being
used to view the web site. See user agent for more details on this.
Use
Browser sniffing can produce information on different aspects of the
browser used. For example, it can detect which type of browser is being
used (e.g., Internet Explorer, Netscape Navigator, Mozilla Firefox,
Google Chrome, Opera, Apple Safari) and which version of the software the
client computer is running. Based on this information, the web server can
provide a web page which will be structured appropriately for the user
agent. Since browsers can vary significantly in their interpretation of a
page, this can be an important consideration for web designers;
consequently, there are a large number of scripts for browser sniffing
available on the Internet and even commercial solutions such as
BrowserObject or BrowserHawk.
Vh
Preben Larsen
--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials