การใช้ Google image proxy แก้ดูรูปจากเว็บนอกช้า

คราวนี้ผมมีทิปการใช้ image proxy มาให้อ่านนะครับ
ถามว่ามันมีประโยชน์อะไร สามารถใช้ประโยชน์ได้กรณีเวลาเข้าดูรูปจากเว็บนอกแล้วภาพโหลดไม่ขึ้นหรือโหลดช้า (หรือแม้แต้ hotlink จากเว็บที่เค้า block referrer!!)
เราสามารถใช้ proxy free จาก Google มาช่วยได้ เพราะ Google เค้ามีเชิพเวอร์วางไว้อยู่ทั่วโลก ทำให้สามารถเรียกเว็บได้เร็วขึ้นครับ
โดยเราสามารถใช้ proxy ได้ในรูปแบบนี้

 

 

 

https://images2-focus-opensocial.googleusercontent.com/gadgets/proxy?url=ใส่ url รูปตรงนี้&container=focus&gadget=a&no_expand=1&resize_h=0

ตย.
https://images2-focus-opensocial.googleusercontent.com/gadgets/proxy?url=http://necz.net/wp-content/themes/inove/img/feeds.gif&container=focus&gadget=a&no_expand=1&resize_h=0
การแสดงผล

หรือถ้าจะเปลี่ยนรูปทั้งหน้าให้กลายเป็น Google proxy ก็สามารถทำได้โดยใช้ javascript นี้เอาไปวางบน addressbar ได้เลยครับ

javascript:(function(){prefix = "https://images2-focus-opensocial.googleusercontent.com/gadgets/proxy?url="; suffix = "&container=focus&gadget=a&no_expand=1&resize_h=0&rewriteMime=image%2F*"; images = document.getElementsByTagName("img"); for (var i = 0; i < images.length; i++) { if (images[i].src.indexOf(prefix) == -1) { images[i].src = prefix + images[i].src + suffix; } }})();

หรือจะบุ๊คมาร์คสคริปต์ไว้เลยก็ได้ เราจะได้ใช้ได้ทันทีไม่ต้องมาก็อบอยู่ :)

ref. http://userscripts.org/scripts/show/68761

  1. ได้ความรู้อีกแล้ว ขอบคุณครับ
    คิดไม่ถึงเลยว่ามันจะมีวิธีแก้ไขได้ด้วยนะนี่…

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>