News: Sensation!!! Adipex p phentermine Viagra xenical Phentermine ups shipped Caffeine Buy Dianabol Biaxin Nasonex Online phentermine Cafergot Phentermine 6 pm order Oxtriphylline Ativan vs xanax Diet pills phentermine Hydroxyzine Buy cod pay phentermine Information about viagra Cefadroxil Phentermine diet medication Zoloft and xanax Fenoldopam Ups cod phentermine Tramadol without perscription Phentermine incrediants Taking phentermine with antidepressants Benztropine Avandamet Fioricet phentermine shipping Lethal doses of klonopin and xanax No overnight prescription xanax Buy Effexor Use of viagra Primidone Soma side effects Phentermine overnight delivery Lisinopril versus viagra Safe internet shopping generic viagraeng Free viagra order online Free prescription sample viagra Paxil and xanax interaction Cod free phentermine shipping Cheapest cialis Oxprenolol Lescol Natural viagra for woman Diphemanil Atenolol Plendil Allegra Related drugs to phentermine Nitrofurantoin Drug information picture identification tramadol er bvf Fioricet order Phentermine hcl Phentermine us pharmacy online consultation Cialis side effects Gemfibrozil Prevacid Generic viagra canada Viagra canada prescription Phentermine and birth defects Cialis drug prescription Bontril Reserpine Tramadol abuse Cheap phentermine no rx 5 90 Discount tramadol Tomorrow Buy cheap vicodin Accolate Viagra story Nylidrin Pravastatin Cheapest secure delivery cialis uk Donepezil Description tramadol Diet ingredient phentermine pill Advair Adipex phentermine pill Extra cheap phentermine Female uk viagra Drug laws ohio diet phentermine Xanax picture 5 mg no prescription Delivery generic overnight viagra Link myblogde online order viagra Capoten Ethinyl Nitrofurantoin Order soma online Viagra in woman Mobic Buy phentermine at amide pharmaceutical Discount phentermine Prazosin Book hydrocodone sport Tramadol and drug tests Nitroglycerin and viagra Cheap phentermine free consult Phentermine online pay with mastercard Micronase Akane soma Phentermine and fast shipping Cod online pharmacy phentermine sell Heart phentermine Xanax overnight delivery Metolazone Free trial viagra Bacampicillin Perscription cialis Menadione Norgestrel Buy Valium Viagra lawsuits Naproxen Phentermine diet pills diet pills Cheap viagra uk Counterfeit viagra Fioricet line Effects long side term xanax Coreg Xanax libido Dihydrotachysterol Levitra vs cialis vs herbal Kaopectate Ambien prescription Ibutilide Phentermine online ordering Cialis drug for impotence Lowest viagra price Asa Herbal phentermine forum India generic viagra Oxymetazoline Buy phentermine prescription Isosorbide Cefotetan Indapamide Cosopt Phentermine and carbs Antazoline Pharmacy phentermine sister Phentermine cheapest price Tramadol sale Perscription phentermine Loratadine Calan Viagra herbal alternative Citalopram Comparison viagra cialis levivia Viagra in canada Snorting xanax Phentermine rankings Trimethaphan Phentermine side effects danger Aciphex Desmopressin On line pharmacy phentermine Viagra online shop Buy soma online Liotrix Piperidolate Bepridil Cheep phentermine with cod payments Erythrityl Viagra substitute Viagra 100 mg Viagra price online Phentermine drug Trileptal Cozaar Carvedilol Viagra prescriptions Bromides Phentermine with no prescription Diazoxide Hyzaar Fluticasone Tramadol Phentermine next day Phentermine diet pill side effects Teniposide Dopamine Taking xanax while pregnant Generic xanax xr Phentermine weight loss Ordering phentermine Stopping xanax 50mg generic viagra Phentermine alternative Diamox Generic viagra cheap Lowest price phentermine with free shipping Viagra high blood pressure Dangers of phentermine heart Buy phentermine online cheap Buy hydrocodone where Thioguanine Non prescription phentermine Generic prescription viagra without Tacrolimus Free sample viagra Cetirizine Cheap phentermine online Online phentermine prescriptions Buy fioricet Xanax gg 258 Noroxin Xanax online without a prescription Chlorpropamide Non prescription phentermine Cephalothin Lowest phentermine Buspirone Methyclothiazide Cheapest phentermine online free shipping Buy generic xanax Is xanax addictive Phentermine without prescription Albendazole Cheap phentermine perscription Paroxetine Pravachol Mirena Viagra for woman study Ceftin Nolvadex Does phentermine speed up metabolism Nicoumalone Discount online viagra Female viagra Viagra cialis Order tramadol Viagra cialis levitra dose comparison Cheap soma Cefixime Deferoxamine Canada online pharmacy viagra Phentermine with no prior prescription Arthrotec Phentermine cod shipping Cialis com Free viagra without prescription Get phentermine Clozapine Phencyclidine Maximum dosage of phentermine Tramadol cash on delivery Saturday delivery phentermine Buy Levitra Hydrocodone lortab Robaxin Phentermine 37 5mg and mastercard Phenindione Grapefruit xanax Allowed cialis tag viagra xhtml Echothiophate Hydrocodone side effects Viagra users Viagra dose Butriptyline Black market costa rica pharmacy phentermine no imprint code Tramadol addiction Side effects of viagra Phentermine in the uk Ampicilin Pill price viagra 150 tramadol Phentermine faqs Generic viagra Diet pal pay phentermine pill Butalbital Information phentermine Dapsone Buy phentermine in canada Minocin Oxcarbazepine Maxzide Hydrocodone cough Death cases from taking phentermine Eulexin Phentermine on line without prescription Buy online viagra securely Adipex meridia phentermine xenical Viagra testimony Viagra class action Warfarin Caverta veega generic viagra Order cheap phentermine Vicodin drug test Natural supplement equivalent to xanax Thiopropazate Blue 30 mg 90 free shipping phentermine pharmacy Phentermine np with hoodia Glucophage Cipro 2 mg xanax Purchase xanax Clarithromycin Clemastine Low dose xanax prosexual Oxazepam Alternative herbal supplement viagra Levivia compared to viagra Nicorette Buy cheap phentermine online Phentermine pharmacies Levallorphan Terconazole Lotrimin Where to buy phentermine Viagra alternative for women Viagra lowest price Vicodin prescription Alternatives to viagra Phentermine pharmacies online Viagra pills Moricizine Phentermine adipex Hydroxychloroquine Diltiazem Azatadine Diet diet dieting phentermine pill Mexico viagra Eon phentermine Tramadol hcl 50 mg tab Womans viagra Buy Zovirax Cheap phentermine no prescription Pindolol Viagra cialis Free try viagra Generic name online qoclick tramadol Cordarone Tramadol 180 Pseudoephedrine Glycerin Viagra and levivia Lithium Buy soma Propofol Phentermine shipped cod Clopidogrel Isoflurophate Phentermine 15 mg Cheapest phentermine price Terbinafine Shipping overnight phentermine Tramadol without a prescription Buy xanax overnight Online doctors perscriptions xanax steroids Xanax next day Vytorin Xanax grapefruit juice Diet hcl phentermine pill Sucralfate Lexapro Purchase tramadol online Fast acting viagra Ambien cr effects side Herbal viagra for women Phentermine hydrochloride ship to missouri Glucotrol Maxzide Phentermine money orders Interstitial cystitis+xanax Singulair Discount priced viagra Soma online pharmacy Femara Protirelin Cheap xanax online Symptom of vicodin addiction Cheapest xanax What is phentermine civ Fenofibrate Cyclophosphamide Fioricet Cheep paris france phentermine Aldactone Phenytoin Impotence pill viagra Ketorolac Buy phentermine online no prescription Phentermine referring report urls Dilaudid Valium and xanax Cialis drug impotence Atrovent Propantheline Pentamidine Piroxicam Chlorthalidone Phentermine free shipping 90 supply Tramadol 377 Alesse Encare Methadone xanax interaction Phentermine purchase Lowest price phentermine Phentermine no credit card cod Metformin Lipitor Alprazolam xanax Tramadol hci Xanax online Ambien withdrawal Generic viagra india Phentermine airborne express Glyburide Cod tramadol Buy cialis without prescription Meridia sibutramine Xanax liver damage Tramadol 50 mg Levivia vs viagra Herbal substitute viagra Flurazepam Order phentermine online uk Phentermine pill discount Cialis commercial Cialis compare levitra Piperacetazine Natural over counter just like viagra stores Idarubicin Clomocycline Climara Natural alternative to viagra Buy Vicodin Plendil Sildenafil Cialis results Alprazolam Generica viagra Low cost phentermine health insurance lead Macrobid Does viagra work for women Fluvoxamine Codeine Zafirlukast Cialis sample Arava Alternative to phentermine Xanax no prescription required Viagra cialis comparison Cialis price comparison No online prescription xanax Aura soma Phentermine no consultation Phentermine studies Orlistat Hydrocodone side effects vicodin Is phentermine safe Bendroflumethiazide Insulin Cialis tadalafil Flagyl Tramadol uses Cheap hydrocodone Isoniazid Nicorette Amoxil Diet phentermine Xanax abuse Methimazole Buying xanax Benicar Online xanax Pepcid Xanax in urine Buy cheap domain onlineatspacecom xanax Lotrimin Famvir Buy Alprazolam Mexican pharmacies online+xanax Phentermine no prescription required next day delivery Minipress Side effects of phentermine Leucovorin Oxyphenonium Diphenoxylate Nimodipine Phentermine 30 mg How long between phentermine and meridia Viagra sale Foradil Dicumarol Viagra impotence pill Percocet Cycrimine Drug viagra Prometrium Free phentermine Hydrocortisone Effexor Buy Bontril Comparisons on online viagra suppliers Isometheptene Elavil Miconazole Cheap quality viagra Nutmeg Levivia dosing compared to viagra Podofilox Reglan Discount vicodin Compare prices on phentermine Buy Phentermine Viagra generic brand Accupril Phendimetrazine Phentermine online prescriptions Cinnarizine Phentermine usa Thiphenamil Abacavir Benadryl Anxiety disorder xanax xr to wean off effexor xr Acarbose Phentermine $89 Xanax mexico Cheap phentermine overnight Cardura Review of herbal phentermine Free viagra canada Keflex Adipex phentermine Women viagra Online tramadol prescriptions Buy viagra without prescription Rofecoxib Viagra drug Plavix Adipex Levivia viagra vs Phentermine hoodia Order vicodin online Tinzaparin Nortriptyline Provera Herbal viagra alternative Phentermine hc Sparfloxacin Adalat Adipex p phentermine vs What does xanax look like Cialis free trial 5 mg diet pills Cheap prescription viagra Lansoprazole Opium Danaparoid Tramadol hcl acetaminotran Cruises soma Capoten Fast delivery phentermine Buy phentermine online with pay pal Online pharmacy tramadol Delivery florida online pharmacy phentermine Naltrexone Olanzapine Mexican pharmacies online+no precription xanax Buy phentermine online cash on delivery Fastin Methylphenidate Meprobamate Propranolol Low natural resources for the drug phentermine Phentermine blue diet pills Levitra vs cialis vs viagra Vicodin side effects Free shipping with phentermine order Nalorphine Montelukast Pantoprazole Avapro Buying vicodin online Buy Adipex Buy xanax no prescription Amiloride Letrozole Is viagra safe for woman Otc viagra Buy cheap meridia Promazine Bactrim phentermine Wholesale pfizer viagra Cheap generic viagra online Description of meridia Xanax anxiety relief pills order here Online pharmacy prescription viagra Darvocet Fiorinal Paris france cheep viagra Canada cialis Invia nasal viagra Best online deal for phentermine Tramadol 50mg Phentermine online stores Saturday delivery cheapest phentermine Lisinopril Cheaper viagra levivia cyalis Bush inauguration speech draft viagra bastard of M357 vicodin Avalide Phentermine works Isocarboxazid Ambien Viagra cream for woman Phentermine and methamphetamine Cheap cialis online Birth defects and phentermine use Alternative herbal viagra Tramadol information Hexocyclium Buy cialis viagra Cheapest price phentermine online pharmacy Tramadol next day Xanax during pregnancy Fiorinal Drug interaction sibutramine and phentermine Ethoheptazine Prozac drug interaction with xanax Viagra overnight shipping Parnaparin Generic soma Tramadol online pharmacy Encainide Pravachol Pfizer viagra Westword fioricet phentermine Griseofulvin Cialis levitra viagra compare Chlorotrianisene Order cialis uk Drug interactions tramadol elavil Free viagra online Clomid Ethanol Research phentermine tolerance Online pharmacy duromine viagra international Cefamandole Cardizem Buy Zoloft Levaquin Didrex Viagra experiences Accolate Avalide Hydrocodone effects Natural alternatives to viagra Ssri phentermine heart Generic viagra from india Ash of soma Phentermine amide Arthrotec Methsuximide Order phentermine phentermine online Cheap phentermine online 37 5 Iprindole No prescripton phentermine Eprosartan Xanax info Labetalol Imitrex Tools needed for injecting xanax 120 tramadol Nefazodone Buy generic online phentermine Zantac 5mg tablets Abbr href rel title title viagra Combivent 2mg xanax Viagra cialis levitra comparison Pentasa Shipping phentermine to florida Xanax look alike Buy tramadol without prescription Maprotiline What does phentermine look like Liquid hydrocodone Lasix Xanax withdrawal symptoms Trimethobenzamide Succinylcholine Phentermine cod delivery Generic viagra overnight Phentermine to buy Quinine Acetaminophen fioricet Norflex Motrin Buy online viagra where Add link phentermine purchase suggest Valsartan Buy phentermine mastercard Norvasc Cheapest phentermine free shipping Viagra online Buy cheap online viagra Lysodren Loprox Natural supplement for viagra Ondansetron Ethisterone Alavert Ketoconazole Cheapest online viagra Caffeine Xanax grapefruit Buy Xanax Camphor Xanax tablets Ganciclovir Ordering 30mg phentermine Uk viagra Ethynodiol Xanax pills Etodolac Picture viagra pill Where to buy phentermine online Methoxsalen Buy online order viagra Antipyrine Calcitriol _cialis et levitra Online pharmacies phentermine xenical meridia Zalcitabine Guanfacine Vicodin online Viagra mail order Cheap diet online phentermine pill Xanax shipped cod Clomiphene Strattera Herbal alternatives to viagra Finasteride Buy viagra canada Thalidomide Phentermine price Plicamycin Pictures of xanax pills Alternative to viagra online 1 loss phentermine pill weight Buspirone Buy prescription tramadol without Cefdinir Does phentermine really work Cheapest phentermine diet pills Klonopin versus xanax Tyropanoate Phentermine in florida Prochlorperazine Dibenzepin Atropine Nortriptyline Ethionamide Disopyramide High cortisol level phentermine Trovafloxacin Meridia side effects Hydrocodone pharmacy Trimeprazine Cheapest phentermine online Phentermine withdrawal symptoms Phentermine yellow 30 mg Medrol Adipex phentermine xenical Viagra cost Tramadol sales Celexa Phentermine 90 day Try viagra for free Cheap price on phentermine Combivent Buy Prozac Cogentin Phentermine and diet pill Buy discount phentermine Flovent Overdose xanax Buy cheap domain onlineoutdoorscom xanax Buy canada cialis Drug screening phentermine Neurontin Order xanax cod Premarin What does xanax do Phentermine online without prescription Phentermine prescribed online Amoxil Cheap phentermine free shipping Altace Cialis viagra levivia Phentermine perscription Sell viagra Long term side effects from xanax Klonopin xanax Fioricet with codeine Purchase cialis online Viagra for sale Cialis for sale uk Phentermine online diet pill Compare levivia and viagra Order phentermine diet pill Phentermine international order Discount phentermine prescription Phentermine tricks Herbal viagra reviews Filing income tax phentermine Generic online phentermine Cortisol Phentermine diet plan Elidel Mephenytoin Alternative herbal review viagra Clomiphene Natural viagra Xanax overnight shipping Methscopolamine Dimethindene Order xanax on line Herbal online viagra Cialis testimonials Tapering off xanax Biaxin Phentermine np Xanax cod Clindamycin Imiquimod Lethal dose xanax Viagra sample Micronase Fluorescein Compare viagra to cialis Biperiden Actos phentermine aciphex imitrex Viagra shelf life Cefazolin Difference between viagra and levivia Dioxyline Buy phentermine diet pill Imdur Ticarcillin Pulmonary hypertension viagra Online viagra sales Oxycontin From generic india viagra Lethal doses klonopin wellbrutrin xanax Tramadol apap Takin prozac and xanax Buy Ambien Generic hydrocodone Insulin Generic viagra lowest prices Female spray viagra Altace Generic overnight viagra Busulfan Soma addiction Cialis levivia viagra vs vs Where can i buy phentermine Esomeprazole Dilantin Phentermine and topiramate for weightloss Cialis free sample Information viagra woman Adipex diet phentermine pill Buy cialis in canada Cialis generic india Viagra online pharmacy Order viagra viagra online Cheapest place buy viagra online Fastin phentermine Ecstasy Drug loss phentermine weight Flupenthixol Prescription weight loss medication phentermine Compare viagra to cialis Buy no online prescription xanax Iodine Soma drug Fluconazole Compare ionamin phentermine Cheap viagra order online Time released xanax Maker of viagra Hydrocodone Cheap online phentermine Leo phentermine order online Cefixime Diet phentermine pill Buy Ativan Phentermine without rx Phentermine Xanax precriptions Cheap phentermine online no prescription Dacarbazine Generic uk viagra Oxycodone vs hydrocodone Generic lowest price viagra Albuterol Order cialis Meridia order Phentermine us Discount ambien Canadian no phentermine prescription Xanax master card Thyroglobulin Phentermine pharmacy online consultation Cheap tramadol no prescription Xanax and pregnancy Buy cheap uk viagra Xanax withdrawl message boards Buy viagra pill online Language phentermine ru Tramadol hcl tab Ceftazidime Buprenorphine Coumadin Cheap diet phentermine pill Online adipex phentermine prescriptions Taking viagra or levitra as a booster for cialis Kaolin Online consultation xanax Long term effects of xanax Bupropion Tricor Phentermine 37_5

如何使得 widgets 不降低网站的加载时间

现在用于网站上的 widgets 越来越多,越来越多人为了在他们的网站或 blog 上显示 Flickr photos、 Twitter status、 iTunes playlists 等而安转了这种第三方代码支持,这些日益增加的 widgets ,尽管当中大概只有 1% 是有用的,当这 1% 很好的改变完善整个互联网的格局。

不过随着 widgets 出现也带来了一个问题:使用 widgets 会降低你的网站速度。在比较好的情况下,你使用的 widgets 来自一个稳定快速的服务器;比较糟糕的是你使用的 widgets 来自一个不稳定的服务器,那对你的网站的影响就会很大。

不管是上面两种情况的那一种,您完成网站的加载和渲染都取决于在别人服务器上的代码运行速度,即使是一个成熟稳定的 widgets ,它也需要时间来反映,这仍然会造成网站加载速度的变慢。

我们对此作了一些研究,想要使得 widgets 不影响网站的加载时间:

根本原因:

大多数的使用 widgets 的方式都是:raw 式嵌入或 javascript 式嵌入。

raw 式嵌入通常是提供一个 object/embed 代码,来直接实现一个 Flash widget,这种方法的优点是它可以在不允许使用 javascript 式嵌入的网站上运行;缺点是:a . 许多人不喜欢把 object/embed 代码直接放在他们的页面上。 b . 有些 widgets 不是基于 Flash 的。 c . widgets 的作者不能对已嵌入的 widgets 进行太大修改变化。

javascript 式嵌入使用了脚本,包括远程部署代码进入用户的网站,优点是:它更简洁也更灵活,它的缺点是:它或多或少的增加了网站加载时间,而且一旦出现问题,网站加载时间将成倍的增加。

解决方案:WEDJE

提供一个 raw 式嵌入还是必要的,因为不是每个网站都允许使用 javascript 式嵌入,但是如果 widgets 是使用在人们自己网站或博客上,javascript 式嵌入仍然是一个更理想方法。所以,为了兼容这两种方式,我们想了一种新的方案: WEDJE ( Widget Enabled DOM Javascript Embedding )。

Standard document.write

大多数的 javascript 式嵌入是简单的使用 document.write 来把代码写入你的页面,问题是,如果 widgets 服务器停了,其余网站就不能运行 widgets 了,直到 javascript 自己停止,很多人误以为可以对其使用延迟属性来防止这种事情的发生,但延迟属性完全阻止了 document.write ,所以它不是一个好的解决办法。

延迟 innerHTML 代码

另外一种 javascript 式嵌入的方法是加入帐号机制,增加一个延迟参数来加载 javascript,在 script 加载完后使用 innerHTML 来写入。这似乎很不错,但在实际中,不同的浏览器的效果都不同。

WEDJE

WEDJE 与上面所讲的延迟 innerHTML 代码有点相似,但它是跨平台、跨浏览器的,我们先写了一个 javascript div ,然后再用 javascript 创建一个 script ,再把这个 script 添加到 javascript div 里,这样形成一个一环套一环的链接。

由于各个要素都通过这种方式连接起来了,浏览器在 script 加载完后能够正确装载和执行 javascript ,而这正是我们要找的方法。

下文是一个使用 wedje 的例子,刷新本页,以下图片会有一个 7 秒的延迟显示。

This text is before the widget code.

This text is after the widget code.

Caveats

目前为止,这种方法测试过的浏览器有:

* Safari: Mac and PC
* Firefox: Mac and PC
* Internet Explorer: PC
* Opera: Mac and PC

1 . 下面是在 js 文件里的代码:

  1. document.getElementById(‘wedje_div_yourcompanyname’).innerHTML+=’<img src="http://www.mikeindustries.com/blog/images/inline/widgetexample.gif" width="160" height="380" />’;

2 . 下面是要嵌入到你页面里的代码:

紧凑版本 ( 如果你的页面为 application/xml ,请勿使用 )

  1. <script type="text/javascript">(function(){document.write('<div id="wedje_div_yourcompanyname"></div>');s=document.createElement('script');s.type="text/javascript";s.src="http://www.mikeindustries.com/blog/scripts/sleepywidget.php";setTimeout("document.getElementById('wedje_div_yourcompanyname').appendChild(s)",1);})()</script>

3 . Application/XML 版本

  1. <script type="text/javascript" language="Javascript" id="wedje_script_yourcompanyname">(function(){c=document.createElement('div');c.id='wedje_div_yourcompanyname';s=document.getElementById('wedje_script_yourcompanyname');s.parentNode.insertBefore(c,s);w=document.createElement('script');w.type='text/javascript';w.src='http://www.mikeindustries.com/blog/scripts/sleepywidget.php';setTimeout("document.getElementById('wedje_div_yourcompanyname').appendChild(w)",1);})()</script>

原文:mikeindustries.com
翻译:peterzsk
本文永久链接:http://zsk.akaka.com.cn/2007/07/widget-deployment/

如果您喜欢我的文章,可以订阅我的 谢谢。
  • 看过本篇的朋友,还看过:

  • 6 Responses to “如何使得 widgets 不降低网站的加载时间”


    1. Gravatar Icon

      这篇文章好!
      不过,不知道对于Google的广告是否也可以如此使用呢?

      [回复]

    2. Gravatar Icon

      找了好久,好东西!

      [回复]

    3. Gravatar Icon
      3zhccc

      没用widgets,直接改sidebar了。一步步学习,建wp不久,多多关照!

      [回复]

    4. Gravatar Icon
      4together4u

      学习一下~

      [回复]

    5. Gravatar Icon

      真是高手啊,学习中

      [回复]

    6. Gravatar Icon

      厉害,我今天刚知道widget里面可以加代码,呵呵,跟楼主差距太大了。

      [回复]

    Leave a Reply