网站建设公司对Flash进行SEO的优化技巧 SWFObject and UFO 网站建设者如果想要充分了解什么是SWFObject(),请访问Geoff Sterns的blog---deconcept并下载有关这种方法的SWFObject.js文件。另一种公开资源UFO (Unobtrusive Flash Objects)可以从Bobby van der Sluis获得。这两个起码在概念上是相似的。例子:制作Flash首页和可以被搜索引擎搜索到的Flash按钮。
下面是Marc Abrahms Photography的有关Flash标题和菜单代码示例的代码。这个网站的内页已经被搜索引擎收录了,因为搜索引擎可以在基本内容里找到相关链接。 ----- <head> <!--snip--> <script type="text/javascript" src="/jscript/SWFObject。js"></script> </head> <body> <!--snip--> <!--primary content, for non-Flash visitors--> <div id="flash" align="center"> <p><a href="/gallery/index。php?category=gallery/1_Prints">prints</a> | <a href="/gallery/index。php?category=gallery/2_Posters">posters</a> | <a href="/gallery/index。php?category=gallery/3_Books">books</a> | <a href="/gallery/index。php?pageId=115&start=0">my account</a> <!--snip, for brevity--> </p> </div> <!-- Flash player detection and Flash insertion --> <script type="text/javascript"> var fo = new SWFObject("homepage_v1。swf", "flash", "680", "390", "5", "#3a403c"); fo。write("flash"); </script> ------ Flash可获性程序不会神奇地让一个网站上升到搜索引擎排名的顶部,但是这种Flash SEO方法会消除由于Flash所带对排名不利的因素。例子:让搜索引擎可以读到Flash幻灯片。
来自Virtutech网站的第二个例子给我们演示了如何将相当长的内容插入到一个固定的空间里。我们使用一个DIV,把它的CSS属性设为"overflow:auto"来创建一个滚动文字区域。这个可以防止在显示替换内容的时候页面的设计被毁坏。在有缺省的Javascript的浏览器上载入Virtutech的首页可以看到替换的内容。 --- <div id="movieAlt"><div id="movieAltInner"> <h2><a href="/products/index。html">Simics</a> is used to develop the embedded software that runs electronic devices such as:</h2> <li>Aerospace hardware</li> <li>Automobile control systems</li> <li>Telecommunications infrastructure</li> <li> High-end servers</li> </ul> <p><em>Hardware:</em> <strong>Satellite Control System</strong></p> <p><em>Challenge:</em> Unable to test software with satellites on orbit。 How to verify new software?</p> <p><em>Resolution:</em> Using Simics, the developers can run software quality tests on the ground, to ensure that the software works correctly before it's installed。</p> <h2>Industry: Automotive</h2> <p><em>Hardware:</em> <strong>Electronic Control Unit</strong></p> <p><em>Challenge:</em> Need to develop software now, but the ECU won't be available for months</p> <p><em>Resolution:</em> Simics enables programmers to develop and test the software before the hardware is available, reducing time to market。</p> <h2><em>Industry:</em> Telecommunications</h2> <p><em>Hardware:</em><strong> Wireless Network Equipment</strong></p> <p><em>Challenge: </em> You have twenty programmers。 Each needs a complete system for testing。 They cost MILLIONS。</p> <p><em>Resolution:</em> Using Simics to create a model of the target hardware, each programmer can have his or her own virtual device for software testing and debugging, without breaking your budget。</p> <h2>Industry: Internet</h2> <p><em>Hardware:</em> <strong>Network servers</strong></p> <p><em>Challenge:</em> Software bugs keep popping up。 Some take weeks to reproduce and fix。 You are running out of time。</p> <p><em>Resolution:</em> With Simics, programmers can run the program forwards and backwards to quickly identify, recreate and repair bugs。</p> </div></div> <script type="text/javascript"> var fo = new SWFObject("flash/virtutech_intro。swf", "mymovie", "497", "287", "7", "#ffffff"); fo。write("movieAlt"); </script> ----- The CSS code: #movieAlt { height: 287px; width: 497px; overflow: auto; /*Scroll bar on HTML content div*/ } #movieAltInner { /*For IE's faulty box model*/ padding: 10px 20px; } ----- 除了可以在这些网站上使用外,我们也可以在其他有很高流量的网站上使用这种Flash SEO方法。这些代码屡试不爽,没有任何问题。使用这种Flash SEO方法的网站已经取得了很好的排名虽然排名的关键字只出现在Flash 内容里。
全站Flash网站 全部使用Flash制作的网站存在很大的弊端,因为它缺少可以组织内容、内部链接、唯一页面标题的页面结构。克服这种弊端的方法就是创建可以代替Flash页面的普通的HTML页面。这样用户访问网站的时候如果他能够观看Flash,他就会打开Flash页面。一个不能观看Flash的浏览者比如说搜索引擎就可以通过普通的HTML页面查看网站内容。如有一个用户跟随搜索结果到其中一个内页里,他们可以感受到相同的Flash经历因为在每个页面上都有Flash影片。另一种方法就是将Flash分割成片段,然后放在把相关片段放在每个页面上。
将Flash分割会产生一个问题, Flash播放的时候不会有原先想要的那个流畅的效果了。要想两全其美,一个方法就是使用FlashVars在Flash 影片中传递一个参数。相同的影片可以出现在每个HTML页面,但是根据参数值,影片可以在相应的页面的合适的时候显示Flash内容。想去掉所有的额外的页面但是仍然能够查看Flash片段的不同的部分,在每个URL后面添加一个a #和一个标签,然后将标签传递到Flash里。这种方法可以让后退和前进按钮正常运行, 可以让用户收藏Flash网站的某一个特殊部分。
也可以使用PHP代码将基本的HTML内容和Flash内容从MySQL数据库中拖出来。这种方法因为只保存一份内容所以可以很大程度上简化对搜索引擎友好的Flash网站的维护。
本知识库文章由flash网站制作公司(上海)原创或翻译,如有转载需求,请联系我们,并注明文章出处,提供网站文章源链接。
|