Saturday, February 25, 2012

Reduce HTTP Request with Data URI in PHP


A part of website optimization technique is Reduce no of HTTP Request when user attempt to open our Web page from our website. HTTP Request count is an important factor for Traffic worthy websites to make your web pages / websites more responsive on time. In this factor of HTTP Request optimization to reduce the HTTP request count of various images in our websites by Rewriting with Data URI Scheme. Data URI is the technology which is used to Reduce and Optimize HTTP request and response.



For example If you have a gallery section in your website. Gallery images are in two Sections one is Thumbnails and another one is actual images. in this case set of 5 Images will request 10 HTTP request every time the Page opens. in this case we can use Data URI with PHP to reduce this HTTP request 0, Data URI will cheat our server and retrieve the image data as plain code along with our standard HTML code.

Friday, February 24, 2012

Login with Twitter OAuth Integration

Today we are going to see how to integrate Twitter OAuth Login Authentication with our website. Let us start How to integrate Login with Twitter Button in our website.

In order to Integrate Twitter Login for your website you need to obtain your Twitter Consumer key and Consumer secret.


Steps to get Twitter Consumer Key and Consumer Secret as follows:
1. Go to : https://dev.twitter.com/ and Login with your Twitter Account credential 




 2. On Top Right Drop down Menu Choose My Applications
















3. In this area twitter list our existing apps. Create a First one by Choosing "Create a New Application"