[対象: ä¸ç´]
Ajaxãå©ç¨ããå ´åã®URLã®çæã«ã¯pushStateã使ã£ã¦ãããã¨Googleã®Matt Cuttsï¼ãããã»ã«ããï¼æ°ã¯å§ãã¦ãã¾ããã
ã¾ãããã¨ã¯å¥ã«Googleã®John Muellerï¼ã¸ã§ã³ã»ãã¥ã¼ã©ã¼ï¼æ°ã«ãAjaxã®URLã«ã¯pushStateã使ããã¨ãã§ããã¨åã¯Google+ã§ã³ã¡ã³ããããã£ããã¨ãããã¾ãã
ãã¦ããã¯Googleã«ããã¦ã®è©±ãªã®ã§ãããBingãAjaxãå©ç¨ããURLã®ãã¹ããã©ã¯ãã£ã¹ã¨ãã¦pushStateãæ¨å¥¨ãããã¨ãå ¬å¼ã«è¡¨æãã¾ããã
BingãAjaxã³ã³ãã³ãã®URLã«ã¯pushStateãæ¨å¥¨
BingãpushStateãæ¨å¥¨ããçç±ã¯Googleã¨åãã§ãã
- Ajaxã®å¦çã§ä½ãããã³ã³ãã³ãã«å¯¾ãã¦â#âã使ããªãéçãªURLãå²ãå½ã¦ããã
- æ¤ç´¢ã¨ã³ã¸ã³ã«Ajaxã³ã³ãã³ããã¯ãã¼ã«ãã¤ã³ããã¯ã¹ãããããã®â#!âã使ãè¤éãªæ§æãæ¡ç¨ããªãã¦ãã
ããã¯æ¤ç´¢ã¨ã³ã¸ã³ã«ã¨ã£ã¦é½åãããããã§ããã
ã¦ã¼ã¶ã¼ãè¦ãURLããã®ã¾ã¾æ¤ç´¢ã¨ã³ã¸ã³ãã¯ãã¼ã«ãã¤ã³ããã¯ã¹ã§ãã¾ãã
Ajaxã使ã£ãã³ã³ãã³ãã®URLã§ãã£ã¦ãé常ã®URLã¨ãªããå¤ããããã¨ãªãæ±ãã¾ãã
Bingã®å ¬å¼ããã°ã®è¨äºã¯URLã«pushStateã使ãã¨ãã®æ³¨æç¹ã«ã触ãã¦ãã¾ãã
ãªã³ã¯åããèµ·ãããªãããã«ãã
pushStateã«ãã£ã¦å²ãå½ã¦ãããURLã«ã¯å¿ ãç´æ¥ã¢ã¯ã»ã¹ã§ããããã«ãã¦ãããã¦ã¼ã¶ã¼ã¯ããæ°ã«å ¥ããã½ã¼ã·ã£ã«ã¡ãã£ã¢ã§ã®å ±æãããã®ã³ã³ãã³ãã«ç´æ¥ã¢ã¯ã»ã¹ãããã¨ãããããã©ã¦ã¶ãæ´æ°ããã¨ãããã®URLã®ã³ã³ãã³ãã表示ãããããã«ãã¦ããã
éè¤ã³ã³ãã³ããçºçãããªãããã«ãã
pushStateã§ã¯URLãç°¡åã«å²ãå½ã¦ãããããã¨ãã£ã¦ãããããä½ãéãã¦ã¯ãããªãããã¨ãã°æå³ããããéè¦ãªãã©ã¡ã¼ã¿ããã¹ã¦âï¼âã®åã«å·®ãè¾¼ãããã«pushStateã使ãããã»ã©éè¦ã§ã¯ãªããã©ã¡ã¼ã¿ã¯â#âã®å¾ã«ç½®ãã
ä¾: é³æ¥½ãã¬ã¼ã¤ã¼ã®ã¢ããªã±ã¼ã·ã§ã³ã§åçä½ç½®ã«å¿ãã¦URLãè¨å®ã§ããå ´å
- ⯠â
http://www.example.com/musicPlayer.aspx?song=TheCanadaSong#pausedAt=42
- Ã â
http://www.example.com/musicPlayer.aspx?song=TheCanadaSong&pausedAt=42
æ¤ç´¢ã¨ã³ã¸ã³ã¯â#â以ä¸ãä¸æã®URLã®ä¸é¨ã¨ãã¦æ±ããªãã®ã§ä¸ã®URLã¯
http://www.example.com/musicPlayer.aspx?song=TheCanadaSong
ã¨ãã¦æ±ãã
対ãã¦ä¸ã¯ãã©ã¡ã¼ã¿ã®ä¸é¨ã«ãªã£ã¦ããã®ã§æ¤ç´¢ã¨ã³ã¸ã³ãèªèããURLã¯
http://www.example.com/musicPlayer.aspx?song=TheCanadaSong&pausedAt=42
ã«ãªãã
åçéå§æéãéãã¨ä¸ã¯ãã®åã ãURLãã§ããããããããã³ã³ãã³ãã¯ã¿ãªåãã
pushStateããµãã¼ããã¦ããªããã©ã¦ã¶ã¸ã®å¯¾å¿
ãã¹ã¦ã®ãã©ã¦ã¶ãpushStateããµãã¼ããã¦ããããã§ã¯ãªãããµãã¼ããã¦ãããã©ã¦ã¶ã§ããµãã¼ããã¦ããªããã©ã¦ã¶ã§ãåãä½é¨ãã§ããããã«ãã¦ãããpushStateæªå¯¾å¿ã®ãã©ã¦ã¶ã«ã¯ç´æ¥ã¢ã¯ã»ã¹ã§ããURLãæä¾ããpushState対å¿ãã©ã¦ã¶ã«ã¯pushStateã§URLãæä¾ããã
Googleã«ç¶ãã¦BingãpushStateã®å©ç¨ãææ¡ãã¦ãããã¨ã¯æ¡ç¨ãèãã¦ãã人ã«ã¨ã£ã¦ã¯å¿å¼·ãå¾æ¼ãã§ããã
2大æ¤ç´¢ã¨ã³ã¸ã³ãpushStateã確å®ã«ãµãã¼ããã¦ãã証æ ã¨è¨ãã¾ãã
ä¸æ¹ãã©ã¦ã¶ã®å¯¾å¿ç¶æ³ã«ããã¦ã¯pushStateãå°å ¥ã§ããHTML5ããµãã¼ããããã¨ãæ¡ä»¶ã«ãªãã¾ãã
Chromeã¨FirefoxãSafariãOperaã¯ãµãã¼ããã¦ãã¾ãã
IEã¯10ãããµãã¼ããå§ãã¾ããã
IEãåºé ãã¦ãããã®ã®ä¸»è¦ãªãã©ã¦ã¶ã¯ãµãã¼ããã¦ããã¨ãããã¨ã§ããã
pushSteteæªãµãã¼ãã®ãã©ã¦ã¶ã¸ã®å¯¾å¦ã«ã¯ããã¤ãæ¹æ³ãããããã§ãã
åã¯éçºã«ã¯è©³ãããªãã®ã§ãã¡ãã¯ãèªèº«ã§èª¿ã¹ã¦ãã ããã
å
é±ç´¹ä»ããWebãã©ã³ããããã§ãããæ°ããæè¡ã¯ãã¹ã¦ã®ç°å¢ã«ãããã¾é©ç¨ã§ããã¨ã¯éãã¾ããã
ãããæéã®çµéã¨ã¨ãã«å©ç¨å¯è½ãªç¯å²ãæ¡å¤§ãã¦ãããã¨ã確ããªãã¨ã§ãã
ã¦ã¼ã¶ã¼ã«ä¸ä¾¿ãæããããªããã¨ã確ããããããªããAjaxã¨pushStateã®çµã¿åããããã£ããåãå ¥ãã¦ãããããã§ãã