

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web &#8211; Max的程式語言筆記</title>
	<atom:link href="https://stackoverflow.max-everyday.com/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>https://stackoverflow.max-everyday.com</link>
	<description>我要當一個豬頭，快樂過每一天</description>
	<lastBuildDate>Fri, 07 Aug 2020 00:50:32 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://stackoverflow.max-everyday.com/wp-content/uploads/2017/02/max-stackoverflow-256.png</url>
	<title>Web &#8211; Max的程式語言筆記</title>
	<link>https://stackoverflow.max-everyday.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>跨來源資源共用（CORS）</title>
		<link>https://stackoverflow.max-everyday.com/2020/08/cors/</link>
					<comments>https://stackoverflow.max-everyday.com/2020/08/cors/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Fri, 07 Aug 2020 00:49:43 +0000</pubDate>
				<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=3487</guid>

					<description><![CDATA[想直接存取 github 上的檔案，發現遇到 C...]]></description>
										<content:encoded><![CDATA[
<p>想直接存取 github 上的檔案，發現遇到 CORS（Cross-Origin Resource Sharing）問題。</p>



<p>跨來源請求是怎麼運作的呢？</p>



<p>主要是由兩個 Header 來做相對的存取控制，Request 當中的&nbsp;<code>Origin</code>&nbsp;和 Response 中的&nbsp;<code>Access-Control-Allow-Origin</code>。</p>



<p>只要發送請求時的 Origin 和回應的 header 中&nbsp;<code>Access-Control-Allow-Origin</code>&nbsp;的值相同，或是<code>Access-Control-Allow-Origin: *</code>&nbsp;（代表允許任何網域存取資源），此時就會放寬 CORS 的限制，允許存取跨域資源。</p>



<p>如果不符合 CORS policy 的話，會顯示下列訊息：</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="148" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2020/08/Screen-Shot-2020-08-07-at-08.11.11-1024x148.png?v=1596760915" alt="" class="wp-image-3488" srcset="https://stackoverflow.max-everyday.com/wp-content/uploads/2020/08/Screen-Shot-2020-08-07-at-08.11.11-1024x148.png?v=1596760915 1024w, https://stackoverflow.max-everyday.com/wp-content/uploads/2020/08/Screen-Shot-2020-08-07-at-08.11.11-600x87.png?v=1596760915 600w, https://stackoverflow.max-everyday.com/wp-content/uploads/2020/08/Screen-Shot-2020-08-07-at-08.11.11-768x111.png?v=1596760915 768w, https://stackoverflow.max-everyday.com/wp-content/uploads/2020/08/Screen-Shot-2020-08-07-at-08.11.11.png?v=1596760915 1275w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>這代表網路應用程式所使用的 API 除非使用 CORS 標頭，否則只能請求與應用程式相同網域的 HTTP 資源。</p>



<p>目前解法：</p>



<p>通過jsDelivr引用資源<br><a href="https://stackoverflow.max-everyday.com/2020/08/jsdelivr/">https://stackoverflow.max-everyday.com/2020/08/jsdelivr/</a></p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">相關文章：</h2>



<p>和 CORS 跟 cookie 打交道<br><a href="https://medium.com/d-d-mag/%E5%92%8C-cors-%E8%B7%9F-cookie-%E6%89%93%E4%BA%A4%E9%81%93-dd420ccc7399">https://medium.com/d-d-mag/%E5%92%8C-cors-%E8%B7%9F-cookie-%E6%89%93%E4%BA%A4%E9%81%93-dd420ccc7399</a></p>



<p>跨來源資源共用（CORS）<br><a href="https://developer.mozilla.org/zh-TW/docs/Web/HTTP/CORS">https://developer.mozilla.org/zh-TW/docs/Web/HTTP/CORS</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2020/08/cors/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>通過jsDelivr引用資源</title>
		<link>https://stackoverflow.max-everyday.com/2020/08/jsdelivr/</link>
					<comments>https://stackoverflow.max-everyday.com/2020/08/jsdelivr/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Fri, 07 Aug 2020 00:41:17 +0000</pubDate>
				<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=3485</guid>

					<description><![CDATA[這個服務真的太神奇了，寫網頁的人應該都要學一下。...]]></description>
										<content:encoded><![CDATA[
<p>這個服務真的太神奇了，寫網頁的人應該都要學一下。</p>



<p>透過 jsDelivr CDN github 檔案的使用方法：</p>



<pre class="wp-block-preformatted">https://cdn.jsdelivr.net/gh/你的用戶名/你的倉庫名@發佈的版本號/文件路徑</pre>



<p>例如我的檔案原本在這裡：<br><a href="https://github.com/max32002/naikaifont/blob/master/webfont/NaikaiFont-Regular-Lite.woff2">https://github.com/max32002/naikaifont/blob/master/webfont/NaikaiFont-Regular-Lite.woff2</a></p>



<p>在github隨意新增了一個 release 後，即可使用下面網址來快取檔案：<br><a href="https://cdn.jsdelivr.net/gh/max32002/naikaifont@1.63/webfont/NaikaiFont-Regular-Lite.woff2">https://cdn.jsdelivr.net/gh/max32002/naikaifont@1.63/webfont/NaikaiFont-Regular-Lite.woff2</a></p>



<p>&nbsp;jsDelivr CDN 的個別援引使用率，可在這裡看：&nbsp;<a rel="noreferrer noopener" href="http://www.jsdelivr.com/package/gh/max32002/naikaifont" target="_blank">www.jsdelivr.com/package/gh/max32002/naikaifont</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2020/08/jsdelivr/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>WD 網路硬碟爆資安漏洞</title>
		<link>https://stackoverflow.max-everyday.com/2017/03/hack-wd-mycloud-nas/</link>
					<comments>https://stackoverflow.max-everyday.com/2017/03/hack-wd-mycloud-nas/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Mon, 06 Mar 2017 17:45:22 +0000</pubDate>
				<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=333</guid>

					<description><![CDATA[好有勇氣的工程師，直接拿 cookie 裡的 u...]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="alignnone size-full wp-image-335" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2017/03/Screenshot-2017-03-07-01.48.09.jpg" alt="" width="1992" height="904" />好有勇氣的工程師，直接拿 cookie 裡的 username 組合起來執行外部指令，就跟SQL Injection 一樣危險。這個WD MyCload的漏洞，補一下就可填起來了，對 username 加入更多的檢查就OK了。</p>
<p>資料來源：<br />
Hacking the Western Digital MyCloud NAS<br />
<a href="https://blog.exploitee.rs/2017/hacking_wd_mycloud/">https://blog.exploitee.rs/2017/hacking_wd_mycloud/</a></p>
<p>&nbsp;</p>
<p>直接 Demo WD 的 MyCloud 有那些漏洞沒寫好，應該有很多是軟體工程師的疏失，在寫網路相關的程式應該要去注意。</p>
<p>Western Digital MyCloud Multiple Remote Root Exploits<br />
<a href="https://www.youtube.com/watch?v=aKu_yWrIIFI">https://www.youtube.com/watch?v=aKu_yWrIIFI</a></p>
<p><iframe title="Western Digital MyCloud Multiple Remote Root Exploits" width="640" height="480" src="https://www.youtube.com/embed/aKu_yWrIIFI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p>&nbsp;</p>
<hr />
<p><strong>Command Injection Bugs</strong></p>
<p>A majority of the functionality of the WDCloud web interface is actually handled by CGI scripts on the device. Most of the binaries use the same pattern, they obtain post/get/cookie values from the request, and then use the values within PHP calls to execute shell commands. In most cases, these commands will use the user supplied data with little or no sanitization. For example, consider the following code from the device.</p>
<p>php/users.php</p>
<pre> 15 $username = $_COOKIE['username'];
 16 exec("wto -n \"$username\" -g", $ret);
</pre>
<p>The code above assigns a value from the COOKIE superglobal variable, which contains array indexes for cookies submitted from the request, to the local variable “$username”. This value is then immediately used in a PHP “<a href="http://php.net/manual/en/function.exec.php" target="_blank">exec()</a>” call as an argument to the local “wto” binary. Since there is no sanitization, using a username value like</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2017/03/hack-wd-mycloud-nas/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Android Intents with Chrome</title>
		<link>https://stackoverflow.max-everyday.com/2017/03/android-intents-with-chrome/</link>
					<comments>https://stackoverflow.max-everyday.com/2017/03/android-intents-with-chrome/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Thu, 02 Mar 2017 21:20:57 +0000</pubDate>
				<category><![CDATA[Android筆記]]></category>
		<category><![CDATA[Dropboxlike開發筆記]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=302</guid>

					<description><![CDATA[接著上一篇 LINE 貼圖網址傳回的資料分析 ，...]]></description>
										<content:encoded><![CDATA[<p>接著上一篇 <a href="https://stackoverflow.max-everyday.com/2017/02/line-mobile-broswer-header/">LINE 貼圖網址傳回的資料分析</a> ，接下來要在 Android 的 WebView 裡開啟我們的App 或讓使用著去 Google Play Store 下載 App.</p>
<p>資料來源：Android Intents with Chrome<br />
<a href="https://developer.chrome.com/multidevice/android/intents">https://developer.chrome.com/multidevice/android/intents</a></p>
<p>&nbsp;</p>
<h4>LINE 的使用範例：</h4>
<ul>
<li>開啟貼圖小舖：<br />
<a href="intent://shop/detail/8072#Intent;scheme=line;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;package=jp.naver.line.android;end">intent://shop/detail/8072#Intent;scheme=line;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;package=jp.naver.line.android;end</a></li>
<li>開啟Play商店：<br />
<a href="market://details?id=jp.naver.line.android">market://details?id=jp.naver.line.android</a></li>
</ul>
<p>&nbsp;</p>
<h4>Google 官方的使用範例：</h4>
<p>Here&#8217;s an intent that launches the Zxing barcode scanner app. It follows the syntax thus:</p>
<p>intent:<br />
//scan/<br />
#Intent;<br />
package=com.google.zxing.client.android;<br />
scheme=zxing;<br />
end;</p>
<p>To launch the Zxing barcode scanner app, you encode your <code>href</code> on the anchor as follows:</p>
<pre class="prettyprint">  <span class="tag">&lt;a</span> <span class="atn">href</span><span class="pun">=</span><span class="atv">"intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"</span><span class="tag">&gt;</span><span class="pln"> Take a QR code </span><span class="tag">&lt;/a&gt;</span></pre>
<p>See the <a href="https://code.google.com/p/zxing/source/browse/trunk/android/AndroidManifest.xml#97">Android Zxing Manifest</a>, which defines the package and the host.</p>
<p>Also, if fallback URL is specified, the full URL will look like this:</p>
<pre class="prettyprint">   <span class="tag">&lt;a</span> <span class="atn">href</span><span class="pun">=</span><span class="atv">"intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;S.browser_fallback_url=http%3A%2F%2Fzxing.org;end"</span><span class="tag">&gt;</span><span class="pln"> Take a QR code </span><span class="tag">&lt;/a&gt;</span>
</pre>
<p>Now the URL will get you to zxing.org if the app could not be found, or the link was triggered from JavaScript without user gesture (or for other cases where we don’t launch an external application.)</p>
<p>&nbsp;</p>
<hr />
<p>附註：如果你用的是 Cordova 請參考這一篇：<br />
<a href="https://stackoverflow.max-everyday.com/2017/11/opening-links-from-cordova-app-in-external-app-facebook-twitter-or-browser-both-for-ios-and-android-ask-question/">https://stackoverflow.max-everyday.com/2017/11/opening-links-from-cordova-app-in-external-app-facebook-twitter-or-browser-both-for-ios-and-android-ask-question/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2017/03/android-intents-with-chrome/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>LINE 貼圖網址傳回的資料分析</title>
		<link>https://stackoverflow.max-everyday.com/2017/02/line-mobile-broswer-header/</link>
					<comments>https://stackoverflow.max-everyday.com/2017/02/line-mobile-broswer-header/#respond</comments>
		
		<dc:creator><![CDATA[max-stackoverflow]]></dc:creator>
		<pubDate>Sun, 26 Feb 2017 08:40:17 +0000</pubDate>
				<category><![CDATA[Dropboxlike開發筆記]]></category>
		<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[LINE]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://stackoverflow.max-everyday.com/?p=280</guid>

					<description><![CDATA[測試，使用 curl header: curl ...]]></description>
										<content:encoded><![CDATA[<p>測試，使用 curl header:</p>
<pre>curl http://line.me/R/shop/detail/8072</pre>
<p>傳回結果：</p>
<pre>&lt;html&gt;
&lt;head&gt;&lt;title&gt;302 Found&lt;/title&gt;&lt;/head&gt;
&lt;body bgcolor="white"&gt;
&lt;center&gt;&lt;h1&gt;302 Found&lt;/h1&gt;&lt;/center&gt;
&lt;hr&gt;&lt;center&gt;nginx&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p><img decoding="async" class="alignnone size-full wp-image-281" src="https://stackoverflow.max-everyday.com/wp-content/uploads/2017/02/Screenshot-2017-02-26-16.19.26.jpg" alt="" width="1144" height="334" /></p>
<hr />
<p>&nbsp;</p>
<p>測試 iOS 平台 Header</p>
<pre>curl -v -H 'User-Agent: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10' http://line.me/R/shop/detail/8072</pre>
<p>執行結果：</p>
<pre>&lt;!DOCTYPE html&gt;
&lt;html dir="ltr"&gt;
&lt;head&gt;
&lt;meta charset="UTF-8"&gt;
&lt;meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"&gt;
&lt;title&gt;LINE&lt;/title&gt;
&lt;link rel="stylesheet" href="//scdn.line-apps.com/n/line_urlscheme/css/line_urlscheme_1464238694.css"&gt;
&lt;script src="//scdn.line-apps.com/n/line_urlscheme/js/lc.line.scheme_1464238694.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;!--CONTENTS-AREA--&gt;
&lt;div class="LyContents" role="main"&gt;
&lt;section class="MdCMN01Cont"&gt;
&lt;p class="mdCMN01Desc"&gt;
Open the LINE app to continue.

&lt;/p&gt;
&lt;div class="mdCMN01Img"&gt;&lt;img src="//scdn.line-apps.com/n/line_urlscheme/img/img_line_160830.png" alt="LINE" width="75" height="75"&gt;&lt;/div&gt;
&lt;div class="mdCMN01Btn"&gt;
&lt;button type="button" class="MdBtn03Gn01" id="jsLaunchApp" data-href="line://shop/detail/8072"&gt; Open LINE App
&lt;/button&gt;
&lt;button type="button" class="MdBtn03Gr01" id="jsInstallApp" data-href="itms-apps://itunes.apple.com/app/line-for-ipad/id913855602"&gt; Download LINE App
&lt;/button&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;!--/LyContents--&gt;&lt;/div&gt;
&lt;!--/CONTENTS-AREA--&gt;
&lt;!--/SCRIPT--&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<hr />
<p>測試 Android 平台 Header:</p>
<pre>curl -H 'User-Agent: Mozilla/5.0 (Linux; U; Android 4.1.1; en-gb; Build/KLP) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30' http://line.me/R/shop/detail/8072</pre>
<p>取得結果：</p>
<pre>&lt;!DOCTYPE html&gt;
&lt;html dir="ltr"&gt;
&lt;head&gt;
&lt;meta charset="UTF-8"&gt;
&lt;meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"&gt;
&lt;title&gt;LINE&lt;/title&gt;
&lt;link rel="stylesheet" href="//scdn.line-apps.com/n/line_urlscheme/css/line_urlscheme_1464238694.css"&gt;
&lt;script src="//scdn.line-apps.com/n/line_urlscheme/js/lc.line.scheme_1464238694.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;!--CONTENTS-AREA--&gt;
&lt;div class="LyContents" role="main"&gt;
&lt;section class="MdCMN01Cont"&gt;
&lt;p class="mdCMN01Desc"&gt;
Open the LINE app to continue.

&lt;/p&gt;
&lt;div class="mdCMN01Img"&gt;&lt;img src="//scdn.line-apps.com/n/line_urlscheme/img/img_line_160830.png" alt="LINE" width="75" height="75"&gt;&lt;/div&gt;
&lt;div class="mdCMN01Btn"&gt;
&lt;button type="button" class="MdBtn03Gn01" id="jsLaunchApp" data-href="intent://shop/detail/8072#Intent;scheme=line;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;package=jp.naver.line.android;end"&gt; Open LINE App
&lt;/button&gt;
&lt;button type="button" class="MdBtn03Gr01" id="jsInstallApp" data-href="market://details?id=jp.naver.line.android"&gt; Download LINE App
&lt;/button&gt;
&lt;/div&gt;
&lt;/section&gt;
&lt;!--/LyContents--&gt;&lt;/div&gt;
&lt;!--/CONTENTS-AREA--&gt;
&lt;!--/SCRIPT--&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<hr />
<p>Mobile Browser會將所有與 User Agent(簡稱 UA)相關的資訊包含在User Agent String裡（平台、OS、瀏覽器、版本等），除了可以使用javascript偵測User Agent String裡的關鍵字，也可以在Web Server 上處理。</p>
<p>熱門行動的裝置的User Agent String:</p>
<p>iPad:</p>
<blockquote><p>Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10</p></blockquote>
<p>iPhone:</p>
<blockquote><p>Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16</p></blockquote>
<p>Chrome for Android Phone:</p>
<blockquote><p>Mozilla/5.0 (Linux; &lt;Android Version&gt;; &lt;Build Tag etc.&gt;) AppleWebKit/&lt;WebKit Rev&gt; (KHTML, like Gecko) Chrome/&lt;Chrome Rev&gt; Mobile Safari/&lt;WebKit Rev&gt;</p></blockquote>
<p>Chrome for Android Tablet UA:</p>
<blockquote><p>Mozilla/5.0 (Linux; &lt;Android Version&gt;; &lt;Build Tag etc.&gt;) AppleWebKit/&lt;WebKit Rev&gt;(KHTML, like Gecko) Chrome/&lt;Chrome Rev&gt; Safari/&lt;WebKit Rev&gt;</p></blockquote>
<ul>
<li><strong>Phone pattern:</strong> <code>'Android' + 'Chrome/[.0-9]* Mobile'</code></li>
<li><strong>Tablet pattern:</strong> <code>'Android' + 'Chrome/[.0-9]* (?!Mobile)'</code></li>
</ul>
<hr />
<p>電腦版 Chrome 41.0.2228.0 在 Windows 的 User Agent string:</p>
<p>Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36</p>
<p>電腦版 Chrome 在 Mac OS X 的 User Agent string:</p>
<p>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36</p>
<p>&nbsp;</p>
<p>相關文章：History of the browser user-agent string<br />
為什麼瀏覽器 user-agent string 總是包含 Mozilla/5.0 ?<br />
<a href="http://webaim.org/blog/user-agent-string-history/">http://webaim.org/blog/user-agent-string-history/</a></p>
<p>下指令：<br />
curl -v -H &#8216;User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36&#8217; http://line.me/R/shop/detail/8072</p>
<p>執行結果：</p>
<pre> &lt; HTTP/1.1 302 Moved Temporarily
 &lt; Server: nginx
 &lt; Date: Thu, 02 Mar 2017 20:23:57 GMT
 &lt; Content-Type: text/html
 &lt; Content-Length: 154
 &lt; Connection: keep-alive
 &lt; Location: http://line.me
 &lt; Cache-Control: no-cache</pre>
<p>網址移動到 http://line.me , 應該是不支援的意思。</p>
<p>&nbsp;</p>
<h4>結論：</h4>
<ul>
<li>Android系統的行動裝置幾乎都有“Android”字眼，且多搭配webkit引擎的瀏覽器，所以可用這兩者作為關鍵字。</li>
<li>而Apple產品的User Agent String幾乎都包含iPhone字眼。</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://stackoverflow.max-everyday.com/2017/02/line-mobile-broswer-header/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
