ternarylabs/porthole Javascript Library

Porthole is a small Javascript library that makes it safe and easy to communicate with cross domain iFrames. Porthole relies on hidden iFrames (later referred to a as proxy) to exchange information. The caller sets a url fragment with the message to pass. The proxy by virtue of being served from the same origin as the callee, invokes a callback method with an event object that contains the message read from the url fragment. The message signaling mechanism is based on a resize event.

How Robots.txt Works

The Robot Exclusion Standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web crawlers and other web robots from accessing all or part of a website which is otherwise publicly viewable. Robots are often used by search engines to categorize and archive web sites, or by webmasters to proofread source code.

How to Create WordPress Plugins

In this days I start developing a WordPress plugin so would like to give you the list of the websites that helped me.

With this websites I created my WP plugin, in the next days I will post it. I hope these links will help someone else as much as they helped me.

PHP get_browser() workaround

To get information from the user’s browser in php there is a function called get_browser(). It returns an object which will contain various information, as the browser name or if javascript is enabled.

So I tried this function but my hosting server show me this error: browscap ini directive not set.

Looking on php.net I found that it works “by looking up the browser’s information in the browscap.ini file.”. Because it’s not my server I can’t do nothing, so I wrote to my hosting support and they gave me an alternative solution: phpbrowscap.

Just follow the QuickStart guide to set up the script and make it works.

If you need get_browser() function but you have server problem use this workaround.

Why use Modernizr?

Modernizr is a Javascript library that detects the features your browser can support, like HTML 5 and CSS3 .It let you manage what to do if the browser don’t show something in the right way.
This library use different approach than detect the browser type, it detects if the specific features are natively implemented. Modernizr aims to bring an end to the UA sniffing practice. Using feature detection is a more reliable way to establish what you can and cannot do in the current browser.

How to use it

First thing to do is to include it into your page “head” tag (download):

<script type="text/javascript" src="modernizr.js"></script>


Random posts