ããã°ãªãã¥ã¼ã¢ã«ï¼MTã«jQuery mobileå°å ¥ãæåã®å¯èªæ§ãªã©ä½¿ãåæéè¦ã«ä½ãã¾ãã
ååãªãã¥ã¼ã¢ã«ããã®ã¯æ±æ¥æ¬å¤§éç½ã®ããå¾ããããªã®ã§ï¼å¹´çµããã«æ´æ°ã¨ãªãã¾ããï¼('A')ï¾ ç¸å¤ããã2ï½ï½ã¾ã¨ããµã¤ãï¼ï¼ã£ã¨åéããããå½ããã°ã§ãããä»åã¯è¦ãããï¼ä½¿ããããï¼ã¹ãã対å¿ãéè¦ãã¦ä½ãã¾ããã
ã2012.2.19ã追è¨ãã¾ãããåãã¼ã¸ãã¨ã®ã¹ãã転éã«ã¤ãã¦
ãªãã¥ã¼ã¢ã«ãããã£ãã
å»å¹´ã®ä»é ã¯ãããªããã°ã ã£ãã®ãã»ã»ã»ï¼ã²ã©ããã¯ãã¿ï¼
ãã¾ãè¦ãããªããªã£ãï¼ã«ã©ã æ§æã¨ãªã£ã¦ã¾ããããã°ãã¼ããå¤ã 追å ãã¦ããã®ã§é常ã«éããã£ãã§ããã
Â
ååã®ããã°ãã¶ã¤ã³ã¯ãã¡ãã
ï¼ã«ã©ã ã«ãã¦ã¹ãããªããããã§ã¢ã¯ã»ã¹æ°ãã¢ãã£ãªã¨ã¤ãã大ãã伸ã³ã¾ãããããè²ã ãªãµã¼ãã¹ï¼ãµã¤ãï¼ãä½ã£ã¦ãããã¡ã«ã½ã¼ã¹ããµã¤ãã¡ãã¥ã¼ããã¡ããã¡ããã¦ããã®ã§ããã
Â
ããã§ãä»åã®ãªãã¥ã¼ã¢ã«ã¨ãªãã¾ããã('A')
Â
ãã£ããã¯ãWEBã¯ãªã¨ã¤ã¿ã¼ããã¯ã¹ããããµã¤ãã®ãªãã¥ã¼ã¢ã«ãè¡ã£ãéã«è¨ç½®ãããã¹ã ã¼ã¹ãªã¿ãã¡ãã¥ã¼ãç§é¸ã§ããã®è§£èª¬ãæ¸ããã¦ã§ãã¡ã¢ããã®è¨äºãèªãã§ããããèªåããªãã¥ã¼ã¢ã«ããããªã£ã¦ããããã(V)(à¹âââà¹)(V)ããããããããããããããã£ã¨ããæãã§ï¼¤ï½èµ·åï¼
Â
ã¡ãªã¿ã«ã¦ã§ãã¡ã¢ããã®ãµã¤ãã¯ç´°é¨ã¾ã§ä½ããã¾ãã¦ãã¦ãããã§ãã
é°å²æ°ãç´ æµã ããè¨äºã®å 容ãé¢ç½ãã¦å¤§å¥½ããªãµã¤ãã®ã²ã¨ã¤ã¨ãªã£ã¦ããã¾ãã
Â
1.ã¨ã³ããªã¼é¨åã468pxå¹ ããâ630pxå¹ ã«å¤æ´ãã¾ããã
以åã¯ã¢ãã»ã³ã¹ã®é¢ä¿ã§ã¨ã³ããªé¨åã®æ¨ªå¹ ã468pxã«ãã¦ããã¾ããã
ããã®ããã¼ããã£ã½ãå ¥ãæãã®æ¨ªå¹ ã§ããã
Â
ããã630pxã¾ã§åºãã¦ï¼æ¬å½ã¯ï¼°ï¼¡ï¼«ï¼µï¼´ï¼¡ï¼³ï¼¯ã¨ä¸ç·ã®728pxã¾ã§åºãããã£ãããã©ï¼æç« ãèªã¿ããããã¾ããããã®å½±é¿ã§å³ã«ãããµã¤ããã¼ã336pxãã
ã336pxå¹ ã®å寸ãâ»ããã¯ï¼°ï¼²ãããªãããã
Â
250pxã«å¤æ´ãã¦ãã¾ããåºåãµã¤ãºãå°ãããªã£ãã®ã§ã¢ãã£ãªã¨ã¤ãã®åå ¥ãæ¸ã£ã¦ãã¾ãããªã¨æ¸å¿µããé¨åã§ã¯ããã¾ããããã®åãã¶ã¤ã³ã§ã«ãã¼ãã¦ã¿ããã¨æã£ã¦ãã¾ãã('A')ãï¼ãµã¤ããã¼ã¯ã·ã£ãã¦ã§å²ã£ã¦ã¾ããã©ãä¸é¨ãã©ã¦ã¶ããã ã¨è¦ã¥ããã®ã§ãããã»ã»ã»ãã£ã±ãç»åã«æ»ããããªã»ã»ã»æ¤è¨ä¸ï¼
Â
2.ãã©ã³ããæåçµã«ã¤ãã¦ï¼è¡éããã©ã³ããµã¤ãºï¼
ã¡ã¤ã³ã®ãã©ã³ãããã©ã®ãè§ã´ããã¡ã¤ãªãªã«å¤æ´ãã¾ããããªã¢ã«ä»äºã®ã¯ã©ã¤ã¢ã³ããã¡ã¤ãªãªæå®ã§å¶ä½ä¾é ¼ãã¦ããã®ã§ä½¿ã£ã¦ã¿ããã ãããè¦ããããã£ã¨ããçç±ã§æ±ºå®ãã¾ãããæåé空ããã¨ãã©ã®ããããèªã¿ãããã§ããã('A')
ãã®è¾ºã¯ï¼¹ï¼¡ï¼´ããã®ããã°Webå¶ä½ã«ãããæç« ã®å¯èªæ§ã«ã¤ãã¦èãã - YATã®Blogãåèã«ããã¦ãããã¾ãããYATããè¯è¨äºãããã¨ã¼ã
Â
ã¨ã³ããªé¨åã®ãã©ã³ããµã¤ãºã¯16pxãline-heightã¯1.4emã¨å¼·å¼ã§ããè¦ãããã£ãã®ã§ããã§æ±ºå®ã§ãã
Â
3.Lazy Loadã§ç»åãã¡ã¤ã«ã®é 延èªã¿è¾¼ã¿
æ¨ªå¹ ãåºããããããã§ä»¥åããã大ããªç»åãè²¼ãä»ããäºããã¨ãã§ããããã«ãªãã¾ãããããããç»åã®èªã¿è¾¼ã¿ã«æéãããã£ã¦ãã¾ãã¨é¢è±çã«ç´çµãã ã®ã§ãlazyloadã¨ããjQueryãã©ã°ã¤ã³ãå°å ¥ãã¾ãããä¿çä¸
ããã§ã¨ã³ããªã¼ä¸ã«ç»åã沢山貼ããã¦ãã¦ãã¹ã¯ãã¼ã«ãããã¨ã«èªã¿è¾¼ãã§ãããï¼ãã§ã¼ãã¤ã³ãã¦ï¼ã§ããã
ããããã追è¨ã
mr_myself00 ããããããææããã¾ããã®ã§å¼ç¨
ææ°çã®lazyloadã¯srcå±æ§ã«ããã¼ç»åãå ¥ãã¦data-originalå±æ§ã«æ¬æ¥ã®ç»åãæå®ããã¨ãããã¨ã§å¯¾å¦ããå¾®å¦ãªæãã®ãã®ã§ãã...ããå¾®å¦ãã©ããã¯äººã«ããã§ãããã
ã£ã¨ãããã¨ã§ãããã®lazyloadã«ã¤ãã¦5509ããã®ããã°ã«ã追è¨ããã¦ãã¾ãã
Â
ã¨ããäºã§å°å ¥ããæ¹ã¯ä»å¾ã®ä¿®æ£ããããè¦ç¢ºèªãå¿ è¦ã£ã½ãã§ããã
GIGAZINEãå°å ¥ãã¦ããã£ã½ãã®ã§ãã©ã対å¿ããã®ãæå¾ ãã¦ããã¾ãã
Â
4.ã½ã¼ã·ã£ã«ãã¿ã³ä¸è¦§ã«ã¦ããããã追å
æè¿ã©ã®ãµã¤ããè¦ãã¨ãã§ã使ã£ã¦ããã½ã¼ã·ã£ã«ã¦ããçããã¨ã³ããªã¼ã®ããã¿ã¼é¨åã«è¿½å ãã¡ãã£ã¦ãã¾ããï½
å æ¥ããã¡ã®ããã°ã§ç´¹ä»ãããè¶ ã»æç¨ä¸ããµã¤ãã®ã½ã¼ã·ã£ã«æ°ãç¬æã«ç¢ºèªã§ãã"ã¦ããçã"ã便å©ã§å¯æããï¼è£½ä½è ã®actyããã¤ã³ã¿ãã¥ã¼ï½susi-paku.comãã½ã¼ã¹ããã®ã¾ã¾è²¼ã£ã¦ããã ãã§ããããããã¾ã便å©ãªãã§ãããã®ãã¿ã³ãæ¼ããã¨ã§è¨äºã®ã½ã¼ã·ã£ã«æ å ±ããã©ã¦ã¶ä¸ã§éãã¦ããã¾ããããã試ã«ãã®è¨äºã®ããã¿ã¼ã«ããã¦ããçããã¯ãªãã¯ãã¦ã¿ã¦ä¸ããã
Â
<a href='javascript:(function(){var d = document; var s=d.createElement("script"); s.charset="UTF-8"; s.src="http://actyway.com/bookmarklet/tenkomori.1-p.js?"+(new Date()).getTime(); d.body.appendChild(s)})();'><img src="tenkomori.png" width="60" height="61"></a>
Â
ä»å¾ãã¦ããçããããã°ã«è²¼ã£ã¦ä½¿ã人ãå¢ãã¦ããããå¬ããéãã§ããç¾å¨ãã¦ããçãã¢ã¤ã³ã³ãä½ã£ã¦ãOKã¨å¶ä½è ã®ããã¡ã¼ãããã許å¯ããã£ã ã®ã§é å¼µã£ã¦å¶ä½ä¸ã§ããåºæ¥ä¸ãã£ããå ¬éããäºå®ãªã®ã§ã楽ãã¿âã('A')
5.jQuery mobileãå©ç¨ãã¦ã¹ãããµã¤ããä½ã£ãã
ã¹ãã¼ããã©ã³ã ããã¹ããã©ãªã®ãã¹ãããªã®ãåããªãããã©ãããã°ãiPhoneã¨ãAndroidã«å¯¾å¿ããã¾ãããï¼movabletypeã§ä½ãã¾ããï¼
ããããã¼ã¸ã«ã¢ã¯ã»ã¹ããéãï¼°ï¼£ããã®ã¢ã¯ã»ã¹ãããã¨ãã¹ãã¼ããã©ã³ããã®ã¢ã¯ã»ã¹ããhtaccess ã§å¤å¥ãã¦åã ã®ãã¼ã¸ã表示ãããä»çµã¿ã§ãã
æ¸ãæ¹ã¨ãã¦ã¯ãã©ãã®ãµã¤ãã§ãã½ã¼ã¹ãåºã¦ããéã
Â
# iPhoneÂ
RewriteCond %{HTTP_USER_AGENT} iPhoneÂ
RewriteRule ^$ /m_index.html [R]
Â
ãåã¹ãã¼ããã©ã³ãã¨è¨å®ãã¦ããæãã§ãããä¸å¿iPadã ãã¯ï¼°ï¼£ãµã¤ããéãããã«ãã¦ãã¾ããç»é¢å¤§ããããã
Â
ãã®ããã«htaccess ã«ããå¤å¥ãè¡ã£ãå ´åãã¹ããããï¼°ï¼£ãµã¤ããè¦ããã¦ãèªåçã«ã¹ãããµã¤ãã«é£ã°ãããçºé²è¦§ãããã¨ãã§ããªãç¶æ ã«é¥ãã¾ãã
ãããã£ã±ãåããããªäºãèãã人ããããã㧠to-Rããã®è¨äºPCç¨ã¨iPhoneç¨ã®ãµã¤ããåãæ¿ãã.htaccess[to-R]ã®ãã©ã¡ã¼ã¿ã¼ãè¨è¿°ãããã¨ã«ãã解æ¶ããã¾ããhtml 以ä¸ã«?mode=pcãä»ä¸ããã¨ããæ¹æ³ã§ã¹ããããã®ã¢ã¯ã»ã¹ã§ãï¼°ï¼£ãµã¤ãã表示ãããããã§ãããããã¯ä¾¿å©ã§ãã('A')
ã追è¨ï¼2012.2/19ã
ä¸è¨è¨å®ã®å ´åããããã¼ã¸ã®ã¿ãããã¼ã¸æ¯ãåãããã¾ããã®ã§ãåãã¼ã¸ã§è¨å®ããå ´åã<HEAD>å
ã«JAVAã«ã¦è»¢éããããè¨è¿°ãã¾ãã
Â
<script type="text/javascript">
if ((navigator.userAgent.indexOf('iPhone') > 0 && navigator.userAgent.indexOf('iPad') == -1) || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0) {
location.href = '/sp_<$MTEntryBasename$>.html';
}
</script>
Â
ä¸è¨ãPCç¨ã¨ã³ããªã«å ¥ããã ãã§ãåãã¼ã¸ãã¹ããã§éãã¦ãèªåçã«è»¢éãããããã«ãªãã¾ãã
Â
PCãµã¤ãã¨ã¹ãããµã¤ãã®è¨äºãéè¤ããçºãæ¤ç´¢ã¨ã³ã¸ã³çã«ã¹ãã ã«ãªããªãããåºå¥
å æ¥ãã¹ãã¼ããã©ã³çã®Googlebot-mobile ãå°å ¥ãããããã§PCçã¨ã¹ãã¼ããã©ã³çã§ç°ãªãURLã§åãå 容ã®è¨äºãæ¸ãã¦ãã人ã«ã¨ã£ã¦ã¯å¿ èªã®å 容ã¨ãªã£ã¦ãã¾ãã
ã»ã¹ãã¼ããã©ã³ç Googlebot-Mobile ã®å°å ¥ã«ã¤ãã¦
ã»Google Googlebot mobile ã®è³ªåã¹ã¬
Â
ä¸è¨ã®å 容ãèªãã§ããã¨ãhtaccessã§ãªãã¤ã¬ã¯ããããéã¯ã©ããªãã¨ããè²ã 質åãä¸ãã£ã¦ããç¶æ ãªã®ã§ä»å¾è¦ç¢ºèªã§ãããç¾ç¶ã§ã¯ãrel="canonical"ãè¨å®ããæ¹æ³ãæè¯ã§ã¯ããã¿ããã
Â
Â
ããã§éè¤ã³ã³ãã³ãã®çºçãé²æ¢ãããã¨ãã§ãã¾ããã('A')ããã¨ã¯ã¦ã§ããã¹ã¿ã¼ãã¼ã«ç¨ã®ã¢ãã¤ã«ç¨XMLãµã¤ããããã®æ¸ãæ¹ãå¤ããªãã¨ããã¾ãããã
Â
ã¢ãã¤ã«ç¨sitemap.xmlï¼XMLãµã¤ããããï¼ï½ã¢ãã¤ã«SEOï½SEOã¾ã¨ã
Â
ãã®è¾ºãåç §ã«ã¢ãã¤ã«ç¨ï¼ã¹ããç¨ã®ãµã¤ãããããä½ã£ã¦éä¿¡ããå¿ è¦ãããããã
Â
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"Â
xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0">
Â
ãµã¤ããããã®urlsetãã¢ãã¤ã«ç¨ã«æ¸ãæãã¦éä¿¡ããURLã®åã«mobileã¿ã°ãè²¼ãæãã«ãªã£ã¦ãã¾ãã
Â
<mobile:mobile />
</url>
Â
ã¨ãããããããã§éè¤ã³ã³ãã³ãã¨ãã¦å¤å¥ãããªãããã«ã¯ãªãã¾ããããã¢ãã£ãªã¨ã¤ããå«ãã ããã°ãéå¶ãã¦ãã人ã¯æ°ã«ããªãã¦ã¯ãªããªãé ç®ãªã®ããªã
6.movabletypeã§ãã©ã°ã¤ã³ã¨ãå©ç¨ããã«ã¹ãããµã¤ããä½ã£ã¦ã¿ã
MTä¸ã§jQuery mobileã使ã£ã¦ãã人ã®è¨äºãã»ã¨ãã©ãªãã¦èªåãªãã«ä½ã£ã¦ã¿ã¾ããã
é常ãªãããã°è¨äº1ã¤ã§ï¼°ï¼£ç¨ã¨ã¹ããç¨å ¼ç¨ã§ï¼£ï¼³ï¼³ã®å¼ã³åºãæ¹å¤ããããã¦æ§ç¯ããã®ã ããã¨æãã®ã§ããé¢åãªã®ã§ãããã°è¨äºãï¼ã¤ä½ã£ã¦ã¿ã¾ããã
Â
ï¼°ï¼£ç¨ã®ããã°è¨äºã®ãã¹ã«ã¹ããç¨ã®ããã°è¨äºãã¹ã®ä¸é¨ã追å ããã°ãç¸äºéãç°¡åã«ã§ããããããªããã¨åã ããæã£ã¦ããã®ã§ä½ã£ã¦ã¿ããç°¡åã«ã§ãã¦ç¬ãã¾ããã
ãè¨äºã®ããã¿ã¼ã«ãã"ãã®è¨äºãã¹ãã¼ããã©ã³ã§è¦ã"ã¯ï¼°ï¼£ã¨ã¹ããç¸äºã確èªã§ãã¾ããã
Â
ï¼ï¼´ã®ã½ã¼ã¹ã¯ãããªæãã
<a href="<$MTBlogURL$>âââ<$MTEntryBasename$>.html">
ã¨ã³ããªã«ãã£ã¦ã¯ã¢ã³ãã¼ãã¼ã«ãã404ãåºã¡ããã®ã§separatorãä»ä¸ããªãã¨ãããªãããã§ãã
Â
ãã¡ãããbasenameã«ããã®ã¯ãã¼ããªã³ã¯ãè¨å®ãã¦ãã¾ãã¨è¿½è¨ã§ããé¨åããªããªãçºã§ããã
éã«ã¹ããå´ãã ãã®è¨äºã®ï¼°ï¼£çãè¦ãã®éã¯ï¼°ï¼£ã®ãã¼ããªã³ã¯ãæ¯ã£ã¦ããã°ï¼¯ï¼«ã ãã楽ã§ããã
Â
ãããªç°¡åã«ï¼ï¼´ã§jQuery mobile使ããã®ããã£ã¨æ¬äººãä¸çªé©ãã¦ã¾ããå¶ä½æ¥æ°ã¯è³å³ï¼æ¥ããããªã®ã§ããã®ç¨åº¦ã§ããã°èª°ã«ã§ãå°å ¥ã§ããã¨æãã¾ãã('A')
7.ã¹ãããµã¤ãã®ç»å解å度ã®å¤æ´
è¨äºå ã«è²¼ããã¦ããç»åãµã¤ãºã®ã¾ã¾ã¹ããã§ç¢ºèªããå ´åã大ãããã¦æ¨ªã¹ã¯ãã¼ã«ãå¿ è¦ã«ãªã£ããè¦ã¥ããã§ããããï¼ã¹ãã対å¿ãã¦ããªããµã¤ãã«å¤ãã§ãããï¼è¨äºå ã®ç»åãèªåçã«åã¹ãâããã©ã³ãµã¤ãºã«ãªãµã¤ãºãã¦ãããjQueryã§ã¹ãããµã¤ãåãã«ç»åãµã¤ãºã縮å°ããæ¹æ³: å°ç²ç©ºéãã¨ããç´ æµãªãµã³ãã«ããã£ãã®ã§å°å ¥ãã¦ã¿ã¾ããã
Â
å æ¥ã®é¬¼æå·æ è¡ã®åçã§æ¯è¼ãã¦ã¿ã¾ãã
ãã®è¨äºã®ã¹ãããµã¤ãï¼https://www.susi-paku.com/sp_post_107.html
ï¼°ï¼£ãµã¤ãã¯ãã®ããã«ç»åã®è§£å度ã¯ï¼°ï¼£çã¨åãã¾ã¾ã§ãã
iPhoneã§ã¢ã¯ã»ã¹ããã¨ãã®ããã«280pxå¹ ã«çå縮å°ãã¦è¡¨ç¤ºãã¦ããã¾ããããã¯ä¾¿å©ã§ããã
Â
ã³ã¼ãã¯ä¸è¨ã追å ããã°ï¼¯ï¼«
Â
<script type="text/javascript">
jQuery(function(){
$('img').each(function(){
var max = 0;
if (navigator.userAgent.indexOf('iPhone') > 0) {
max = 280; // iPhoneã®æ大å¹
} else if (navigator.userAgent.indexOf('iPad') > 0 ) {
max = 768; // iPadã®æ大å¹
} else if (navigator.userAgent.indexOf('iPod') > 0 ) {
max = 280; // iPodã®æ大å¹
} else if (navigator.userAgent.indexOf('Android') > 0) {
max = 280; // Androidã®æ大å¹
}
var w = $(this).width();
var h = $(this).height();
if (max != 0 && w > max) {
$(this).width(max).height(Math.round((max/w)*h));
}
});
});
</script>
Â
ã¹ãããã¨ã«è§£å度ãå¤æ´ãã¦ãããæãã§ãããèªåã®å ´åã¯280pxãã¡ããã©ããã£ãã®ã§iPhoneãAndroidã¨ãã«ãã®è§£å度ã«ãã¾ãããLightTabã®ãããªAndroidã¿ãã¬ããã®å ´åã¡ãã£ã¨å°ããæ°ããã¾ããï¼Android tabã£ã¦ç¡ãã®ããªï¼ããã«ãã£ã¦ç»åã®æ¨ªã¹ã¯ãã¼ã«ã¯é²ããã®ã§éå®ãã¾ããã('A')
Â
ã¡ãªã¿ã«iPhoneã®ã¸ã§ãã¬ã¼ã¿ã¼ã¯Adobe Airã®Mobilizer | Springboxã使ã£ã¦ã¾ãã
Â
8.404NOTFOUNDãã¤ãã£ã¦ãããã
WEBã¯ãªã¨ã¤ã¿ã¼ããã¯ã¹ããã®ãªãã¥ã¼ã¢ã«ã«å½±é¿ãåããã®ãªã404ä½ããªãã¨ãããã§ãããï¼('A')
ãWEBã¯ãªã¨ã¤ã¿ã¼ããã¯ã¹ããã®404ï¼ã¤ã³ãã¯ãããããã¼ã
Â
404ã®ã£ã¨ãµãããã©ã('A')<ãããªãã¼ã¸ãªãã
é常ã«ã·ã³ãã«ã§ãã¿ã¾ãããï½ã404ã«ãµã¤ãå æ¤ç´¢ãè¨ç½®ããã£ã¦è¯ãã¢ã¤ãã¢ã§ããããåèã«ããã¦ããã ãã¾ããï¼
Â
9.ãã®ä»ãããã
ããã¯ãã¼ã¯ç¨ã®ã¢ã¤ã³ã³ãã¦ãã©ãã¾ãã«å¤æ´ããããããã¿ã¼é¨åã«ããããã¼ãä½ã£ã¦ã¿ãããããã1000æã®æã«ç»åãå ¥ãæ¿ãã§è¡¨ç¤ºããããã«ãã¦ãã¾ããã©ããç¹ã«é¢ç½ãã¢ã¯ã·ã§ã³ãèµ·ããä»æãã¯ããã¾ããã('A')ï½»ï¾ï¾ï¾ï¾
Â
ãµã¤ããªãã¥ã¼ã¢ã«ã«ã¤ãã¦é·ããªãã¾ããããããªæãã§æ¨å¹´æ«ãã£ããä½ã£ã¦ã¿ã¾ããããã®æ¬¡ã¯ Google Feed APIã§ä½ã£ãã¢ã³ãããµã¤ããjQuery mobileãå©ç¨ãã¦ä½ãå¤ããªããWEBå±ã®ã¢ã³ãããµã¤ããä½ã£ã¦ã¿ãããã¨ç®è«ãã§ããããã¾ããã楽ãã¿ã«âãããäºãã£ã±ãã ããã»ã»ã»('A')ããã¾ã