我刚刚问了这两个问题,一个在 flash seo url best practices 上和一个 url redirects for seo in flash ,它让我阅读了更多关于 cloaking and sneaky javascript redirects 的信息.
在那cloaking and sneaky javascript redirects文章,它说:
"Provide the textual contents of JavaScript in a noscript tag... Ensure that you provide the same content in both elements (for instance, provide the same text in the JavaScript as in the noscript tag). Including substantially different content in the alternate element may cause Google to take action on the site."
"Use of JavaScript is an entirely legitimate web practice. However, use of JavaScript with the intent to deceive search engines is not. For instance, placing different text in JavaScript than in a noscript tag violates our webmaster guidelines because it displays different content for users (who see the JavaScript-based text) than for search engines (which see the noscript-based text)."
对我来说,这听起来像是,如果您有一个 Flash 站点,并且希望它成为 SEO,那么如果您向 google 呈现一个与 flash swf 具有相同文本内容的 html 页面,那么您就安全了。只要我不是“意图欺骗搜索引擎”并且不是“在备用 [flash] 元素中包含完全不同的内容”,我就安全吗?那是合法的吗?有人验证过吗?
我还从那套网站管理员指南中了解到,将 site.com/home.html 等 url 重定向到 site.com/#/home 是可以接受的> 对于 Flash 用户,因为其目的不是欺骗,如果他们只是“ View ”不同,而“模型”保持不变,这是否合法?
他们在那篇文章中也说:
"Note that placement of links within JavaScript is alone not deceptive. When examining JavaScript on your site to ensure your site adheres to our guidelines, consider the intent."
...所以这似乎是一个合理的解决方案,不是吗?也就是说,将用户重定向到适当的 flash url,并呈现 html 以获得必要的可访问性和 SEO。
我理解偷偷摸摸和伪装可能会产生恶意,但这绝对不是本意。我正在寻找更多类似的东西,我怎么能在不让谷歌生气的情况下完成这项工作?
老实说,如果我在 Rails 中添加了一些东西来检查用户代理并使用类似这样的东西为谷歌呈现一个无 flash 的 html 页面,我真的不知道谷歌是如何判断的:turn off rails sessions for robots .如果我检查用户代理并只重定向用户,而不是谷歌机器人,谷歌能看到吗?
是这样的Fleb Flash Framework “隐形”?它们有一个 div 元素,该元素返回 flash swf 或纯 html 内容。或者这个在SEO with Flash
最佳答案
您可能对 Google 的 improved Flash indexing 感兴趣能力。即使使用纯 Flash 网站,您仍然可以获得良好的 SEO,尤其是您获得高质量的入站链接。
您计划的重定向技术听起来很合理,但它仍然存在对 Google 的索引算法来说可能显得可疑的风险。
关于flash - SEO 的合法 URL 伪装?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1878193/
从给定URL下载文件并立即将其上传到AmazonS3的更直接的方法是什么(+将有关文件的一些信息保存到数据库中,例如名称、大小等)?现在,我既不使用Paperclip,也不使用Carrierwave。谢谢 最佳答案 简单明了:require'open-uri'require's3'amazon=S3::Service.new(access_key_id:'KEY',secret_access_key:'KEY')bucket=amazon.buckets.find('image_storage')url='http://www.ex
我正在编写一个小脚本来定位aws存储桶中的特定文件,并创建一个临时验证的url以发送给同事。(理想情况下,这将创建类似于在控制台上右键单击存储桶中的文件并复制链接地址的结果)。我研究过回形针,它似乎不符合这个标准,但我可能只是不知道它的全部功能。我尝试了以下方法:defauthenticated_url(file_name,bucket)AWS::S3::S3Object.url_for(file_name,bucket,:secure=>true,:expires=>20*60)end产生这种类型的结果:...-1.amazonaws.com/file_path/file.zip.A
我正在使用Rails构建一个简单的聊天应用程序。当用户输入url时,我希望将其输出为html链接(即“url”)。我想知道在Ruby中是否有任何库或众所周知的方法可以做到这一点。如果没有,我有一些不错的正则表达式示例代码可以使用... 最佳答案 查看auto_linkRails提供的辅助方法。这会将所有URL和电子邮件地址变成可点击的链接(htmlanchor标记)。这是文档中的代码示例。auto_link("Gotohttp://www.rubyonrails.organdsayhellotodavid@loudthinking.
我正在使用RubyonRails3.0.9,我想生成一个传递一些自定义参数的link_toURL。也就是说,有一个articles_path(www.my_web_site_name.com/articles)我想生成如下内容:link_to'Samplelinktitle',...#HereIshouldimplementthecode#=>'http://www.my_web_site_name.com/articles?param1=value1¶m2=value2&...我如何编写link_to语句“alàRubyonRailsWay”以实现该目的?如果我想通过传递一些
我正在编写一个简单的静态Rack应用程序。查看下面的config.ru代码:useRack::Static,:urls=>["/elements","/img","/pages","/users","/css","/js"],:root=>"archive"map'/'dorunProc.new{|env|[200,{'Content-Type'=>'text/html','Cache-Control'=>'public,max-age=6400'},File.open('archive/splash.html',File::RDONLY)]}endmap'/pages/search.
如何使此根路径转到:“/dashboard”而不仅仅是http://example.com?root:to=>'dashboard#index',:constraints=>lambda{|req|!req.session[:user_id].blank?} 最佳答案 您可以通过以下方式实现:root:to=>redirect('/dashboard')match'/dashboard',:to=>"dashboard#index",:constraints=>lambda{|req|!req.session[:user_id].b
如果我在模型中设置验证消息validates:name,:presence=>{:message=>'Thenamecantbeblank.'}我如何让该消息显示在闪光警报中,这是我迄今为止尝试过的方法defcreate@message=Message.new(params[:message])if@message.valid?ContactMailer.send_mail(@message).deliverredirect_to(root_path,:notice=>"Thanksforyourmessage,Iwillbeintouchsoon")elseflash[:error]
我正在使用Dragonfly在Rails3.1应用程序上处理图像。我正在努力通过url将图像分配给模型。我有一个很好的表格:{:multipart=>true}do|f|%>RemovePicture?Dragonfly的文档指出:Dragonfly提供了一个直接从url分配的访问器:@album.cover_image_url='http://some.url/file.jpg'但是当我在控制台中尝试时:=>#ruby-1.9.2-p290>picture.image_url="http://i.imgur.com/QQiMz.jpg"=>"http://i.imgur.com/QQ
除了协议(protocol)定义中的斜杠('http[s]://'、'ftp://'等)之外,我想替换URL中的所有多个斜杠。我该怎么做?此代码无一异常(exception)地替换:url.gsub(/\/\/+/,'/') 最佳答案 您只需排除任何以:开头的匹配项url.gsub(/([^:])\/\//,'\1/') 关于ruby正则表达式:replacedoubleslashesinURL,我们在StackOverflow上找到一个类似的问题: http
给定一个文本,我想删除url部分并保留其他文本。例子:'blablabla...blablabla...http://bit.ly/someuriblablabla...'成为'blablabla...blablabla...blablabla...'是否有任何ruby内置方法可以有效地执行此操作? 最佳答案 尝试使用正则表达式:(?:f|ht)tps?:\/[^\s]+ 关于ruby-使用ruby从文本中删除url,我们在StackOverflow上找到一个类似的问题: