Posts

Manage HTML5/JS metadata using custom data attributes

HTML5 introduces custom data attributes for tags - these are attributes that starts with "data-". These will be treated as a storage area for private data . If you rely on element class names or rel attributes to store arbitrary snippets of metadata and still look for "hooks", these data attributes will come as a relief. Prefixing the custom attributes with data- ensures that they will be completely ignored by the user agent. As far as the browser and indeed the website’s end user are concerned, this data does not exist. Every HTML element may have any number of custom data attributes specified, with any value. Data attributes can be used in the following scenarios - To store the initial height or opacity of an element which might be required in later JavaScript animation calculations To store parameters for a Flash movie that’s loaded via JavaScript To store custom web analytics tagging data  To store data about the health, ammo, or lives of an e...

My favorite articles on building responsive/adaptive web pages

Image
As the Tablet wars get fiercer and accessing the Web moves beyond desktop browsers, web developer face the challenge of making web pages they create work on all kinds of devices. Thanks to CSS3, there can just be a single web page that can be made to work on a variety of screen resolutions. While there are a bunch of ready-made templates and frameworks  like Twitter Bootstrap  to build responsive pages, understanding how they work is important if you've to customize it. I feel there is a dearth of  beginner level, 101 articles that explain how to build responsive/adaptive web pages. If you're getting started, here are some articles that I found so far (this is a work in progress) which are simple and easily understandable - Responsive Design with CSS3 Media Queries CSS3 Media Queries The width:auto\9;  IE (for versions 8 & below) hack to make images flexible Responsive Web Design - Ethan Marcotte Media Queries - MDN v5, the Responsive HTML5 Mast...

Read this if you shop online with credit/debit cards

Image
Brick & mortar companies face a tough competition from online shopping sites as they offer greater convenience & cheaper prices. But should you trust these websites with your credit or debit cards? Here are some interesting question (& links to answers) from online technical forums to help you take better decisions - How are Cleartrip & PayTM able to store the credit/debit card details of the customers for future purchases in contrast to other websites like Flipkart/Snapdeal/Myntra etc. which require customers to enter card details for every transaction? Groupon SG is Storing Customers' Credit Card Information. Is Groupon safe? How does Amazon bill me without the CVC / CVV / CVV2? What's the impact of disclosing the front-face of a credit or debit card? work in progress...