Browser Snippets


22 March, 2014   

You can display your link description in the status bar of your browser.

01 February, 2011   

Missing images will either just display nothing, or display a [ ? ] style box when their source cannot be found. Instead you may want to replace that with a "missing image" graphic that you are sure exists so there is better visual feedback that something is wrong. Or, you might want to hide it entirely. This is possible, because...

17 February, 2019   

Missing images will either just display nothing, or display a [ ? ] style box when their source cannot be found. Instead, you may want to replace that with a "missing image" graphic that you are sure exists so there is better visual feedback that something is wrong. Or, you might want to hide it entirely. This is possible because...

If you've ever discovered that someone has linked to your web site within a frame, which means your site is stuck in their frame with their information displaying within another frame, you know how frustrating this can be. You want your visitors to visit your web site within their standard browser window - not within another web site's frame....

09 November, 2013   

Just like your browser's back button, the following script allows the user to press a button to returns the user to the previous page. Paste the following code where you want the button to appear on your page:

26 November, 2018   

Cross-browser method for testing for pop-up blockers.

16 January, 2011   

One of the most common mistakes I see beginners and intermediates fall victim to when it comes to CSS is not removing the default browser styling. This leads to inconsistencies in the appearance of your design across browsers, and ultimately leaves a lot of designers blaming the browser. It is a misplaced blame, of course. Before you do anything...

07 March, 2011   

Shows how to create a simple file download by using PHP. The content could also be dynamically generated)

06 March, 2012   

An example code for JavaScript Random Quotes

Cross Browser Vertically and Horizontally Centered Images in CSS without Tables

14 December, 2013   

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on.

14 July, 2014   

A few points of interest: * The HREF links use JavaScript to set a browser cookie named "style". * Since we are only setting one cookie and it's name is "style", we can read its value using "document.cookie.charAt(6)". * If no cookie is set, "StyleFile" will evaluate to "style.css". * The...

03 April, 2014   

JavaScript functions to add, fetch or delete browser's cookies

Just some funzies with CSS3 animations. If you are worried about super deep browser support, use a GIF.

02 November, 2016   

A PHP template for dealing with any sort of error

13 November, 2014   

Here is a form that asks for Name and Email address. When the form is submitted the Email address is verified first. If you put in a Name and a correct Email address, an anchor element is displayed allowing the user to download the file, two cookies are created storing the Name and Email address. If the user goes BACK in the browser and tries...

PHP code to display a thumbnail image on the page without saving it

Tries to make out of the given string a xhtml-compatible string, that means that the return-string could be wrapped within a xml.

Flex: My First Flex / Facebook Application by chrisaiv