) http.ilanni.comACL UA Hdr_sub (user-agent)-I android iphoneREDIRECT Prefix http://www.ilanni.com if UAUse_backend Httpserver If Is_httpBackend HttpserverBalance SourceServer Web1 127.0.0.1:8080 maxconn 1024x768 weight 3 check Inter rise 2 Fall 3In the above configuration file, the following two lines need to be noted:ACL UA Hdr_sub (user-agent)-I android iphoneREDIRECT Prefix http://www.ilanni.com if UAIn
As Android devices grow, many sites are starting to device Android devices, while Android's mainstream devices are mobile phones and tablets. Web site in the adaptation through the user agent (user agents, hereinafter referred to as UA) and how to distinguish it, this part of the content translated from Google's official blog Mo ' Better to also detect "mobile" user-agent.
Sharply
Standard judgment rule: Mobile Android has "mobile" string in the Use
A small example of setting the IFrame height automatically in JavaScript. For more information, see
The Code is as follows:
Function SetIFrameHeight (down ){Var Sys = {};Var ua = navigator. userAgent. toLowerCase ();Var s;(S = ua. match (/msie ([\ d.] + )/))? Sys. ie = s [1]:(S = ua. match (/firefox \/([\ d.] + )/))? Sys. firefox = s [1]:(S =
(version:10.0.920 0.16576) as a test browser.Figure 1 IE Document ModeIn addition to viewing from developer tools, it is possible to learn the document schema from the property Compatmode of the Document object, which has only two values Backcompat and Css1compat, which corresponds to Quirks mode. Standards Mode. When you switch document mode in Developer tools, the page refreshes automatically and the value of compatmode changes.How does the browser determine the document type?In the previous
Plan to use Nginx cache to mitigate back-end pressure. The website has two versions of mobile phone and desktop, currently using PHP for simple judgment, the code is as follows:
function isMobile(){ $ua = $_SERVER['HTTP_USER_AGENT']; $ismobile = preg_match('/Android|iPhone|IEMoble|Mobile/i', $ua); $ismobile = preg_match('/iPad|Tablet/i', $ua
--- a/src/com/android/browser/BrowserSettings.java+++ b/src/com/android/browser/BrowserSettings.java@@ -272,6 +272,8 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, } else { settings.setUserAgentString(USER_AGENTS[getUserAgent()]); }+ String uaprofile = www.baidu.com;+ settings.setUserProfileString(uaprofile); }Generally, UaProfile is an xml webpage stored on the server of the carrier. We will replace www.baidu.com first.
T
, the current address of the user (terminal) is always stored in the SIP server. When the user is called, the SIP server is able to send the SIP request to the user's current address.3, Physical NetworkSip UA, the user agent, is the most basic SIP entity, which is usually the user terminal. Ideally, session creation between users can be done through SIP UA. (see section 2nd, Session Initiation and manageme
+)/. Test (US)) {Engine.ver=regexp ("$"); Engine.webkit=parsefloat (Engine.ver); //Are you sure it's Chrome or safari ? if(/chrome\/(\s+)/. Test (US)) {Browser.ver=regexp["$"]; Browser.chrome=parsefloat (Browser.ver); }Else if(/version\/(\s+)/. Test (UA)) {Browser.ver=regexp["$"]; Browser.safari=parsefloat (Browser.ver); }Else{ //to approximate the version number varSafariversion=1; if(engine.webkit) {safariversion=1; }Els
format:
"1 pi" (1≤ pi current width ofsheet]) -the first type query.
"2 li ri" (0≤ lI Ri ≤[ current width of sheet])-the Second type query.
OutputFor each query of the second type, output the answer.Input7 41 30 S2 0 12 1 2Output43Idea: Violence update, then use Fenwicktree or segmenttree to do interval sum.Because the value of each location will only be updated to another location once, so the violent word complexity is O (n), and then update the time in two c
// Create an object. The object name must be Ext.EXT = {version: '2. 0.1 '};// In the browser before ie5, undefined is not the sub-object of Windows Object. Window. undefined = undefinedWindow ["undefined"] = Window ["undefined"];// A kind of method is implemented. The apply method is used to copy the attention and method in C to O, if some of the implied conformances and methods need to be integrated into the O, you only need// These conformances and values form a pair (you can also use the "{}
encrypted, and can be converted to the original plaintext after conversion) to the server for verification. The server directly verifies whether the local server matches the user name and password provided by the client. If yes, the server passes verification.
2. Anonymous Access
After IIS on the server allows anonymous access, the requested resources are directly returned to the client without authentication after receiving the resource request from the client.
GET/iisstart.htm HTTP/1.1
Accept
verifies that the server locally matches the user name and password provided by the client, and if so, validates it.
Second, anonymous access
When server-side IIS sets the Allow anonymous access, the requested resource is returned directly to the client after the client's resource request is received and no authentication is required.
Get/iisstart.htm http/1.1
Accept: */*
Accept-language:zh-cn
Ua-cpu:x86
Accept-encoding:gzip, deflate
If-modified-sinc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.