기본 콘텐츠로 건너뛰기

라벨이 fragment인 게시물 표시

spiderable package를 살펴보았다.

동적페이지를 만들면 웹크롤러들이 찌르러 왔다가 빈손으로 돌아가곤 한다. 이래서야 안될일. 발번역부터 시작해보자. // list of bot user agents that we want to serve statically, but do // not obey the _escaped_fragment_ protocol. The page is served // statically to any client whos user agent matches any of these // regexps. Users may modify this array. // // An original goal with the spiderable package was to avoid doing // user-agent based tests. But the reality is not enough bots support // the _escaped_fragment_ protocol, so we need to hardcode a list // here. I shed a silent tear. 우리가 정적으로 제공하고 싶지만 _escaped_fragment_ 프로토콜을 따르지 않는 봇 사용자 에이전트의 목록입니다. 페이지는 사용자 에이전트가 이러한 정규식 중 하나와 일치하는 모든 클라이언트에 정적으로 제공합니다. 사용자는 이 배열을 변경할 수 있습니다. spiderable 패키지와 원래 목표는 사용자 에이전트 기반의 테스트를 실시하는 것을 피하기 위해서였다. 하지만 현실은 봇들은 _escaped_fragment_ 프로토콜을 지원하지 않기 때문에, 여기에서는 목록을 하드 코딩해야합니다. 나는 조용히 눈물을 흘렸다. Spiderable.userAgentRegExps = [     /^facebookexternalhit/i, /^linkedinbot/i, /^twitterbot/i]; 요놈들! 말을 듣지 않는 나쁜 아이들이 니 놈들이렸다! 이 오라질 것들...