Pagination is one of the ubiquitous UI elements in website design. Designed in various formats and color combinations, this UI element has remained relatively static with respect to its usability functions. But in my opinion there is a lot more we can squeeze out of this little element. My pet peeve regarding pagination is its inability to inform me about the content residing on a particular page in question, especially in Worpress like CMS.
Read More

There is some confusion among users regarding the new HTML5 keygen element. The keygen element generates a public/private key pair and then creates a certificate request. Many users want to know the exact use of the element when SSL is available. This is my take on the subject. Correct me if I’m wrong.

<form action="process.cgi" method="post" enctype="multipart/form-data">
 <p><keygen name="key"></keygen></p>
 <p><input type=submit value="Submit key..."/></p>
</form>

Read More

Mobilize.js allows web developers create mobile sites out of existing websites with little effort. It supports the following features:

Automatically detect mobile browsers.
Easy to integrate – no server side changes needed.
Open source – no expensive software or licenses needed.
Familiar HTML5, Javascript and JQuery Mobile tools used.
Supports iPhone, Android, Blackberry, Opera Mini and other browsers and devices.

If you have a WordPress site, plugins are available for the same. To see exactly how mobile.js works, check this section of the documentation.

Today a couple of hours back my site got compromised. Not much changes to the code, but the .htacces was changed and some code like the below was added to the .htaccess file, which redirected the traffic coming from search engines to a malware site.


Read More

Opa is a new generation of web development platform – it is a new programming language, a new web server, a new database and a new distributed execution engine, all of them tightly integrated to provide a great experience for web developers.

OPA is concise, simple and readable, it is also provides concurrent, dynamically distributed, and extremely secure programming model. Opa is designed to make web development fun, secure and right. Opa is a complete language and not just a framework, the unified approach of Opa delivers a new level of developing experience with unmatched ease of use and security.
Read More

WPtouch Pro! is a WordPress plugin for self-hosted WordPress websites that shows a well-designed mobile theme version of your site when visitors are using popular touch mobile devices like the iPhone/iPod touch, Google Android phones, Palm Pre/Pixi, Samsung bada and Blackberry Storm & Torch devices.
Read More

We have come a long way in web development – from static sites to distributed applications in the cloud; helped by a plethora of languages and frameworks. Many technologies made a surprising return – like the Phoenix rising from the ashes, JavaScript made a resurrection and with it the rise of libraries like jQuery and others; CSS helped us create stunningly attractive sites and entice the audience. But after all these years and the amazing technologies at our disposal, the websites we create are still fundamentally dumb in nature.
Read More

Merge multiple PDFs using Ghostscript

by: Sameer Posted in: linux |  

1 Aug 2011

Merging multiple PDF is not a common task, but it is good to know how to do it once the requirement arises. Specially if you want to merge documents from within a language like PHP. Although there are a few PHP classes that do the job, many throw out errors due to incompatibility between different versions of PDF and the compression used thereof. The last good (and free) solution I found was that of using Ghostscript to merge the PDF’s, and calling the command from PHP.

A simple Ghostscipt command to merge two PDFs in a single file is shown below.

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf

Semantic markup for better search results

by: Sameer Posted in: data,html |  

28 Jul 2011

Search-engines have reached a impasse with respect to understanding of HTML data. Although most sites, especially databases centric sites use structured data in the backend, once the data is rendered as HTML the data looses all its structure and makes it difficult for search engines to understand them correctly. Until now most search engines have relied on extracting keyword text from the web pages and ranking the pages accordingly, taking the context around the keyword into consideration. This obviously has its limitations and it can only take you so far.
Read More

The following is a very short code to read the version number of a PDF document using PHP. I needed this recently during a PDF processing app developed in PHP. As Adobe uses different compression methods in various versions, it becomes necessary to be able to identify the version of the PDF under work.
Read More