From this page you can download a smart form script, that almost needs no configuring, but still handles posted forms very securely. This form is an ideal solution if you don't have an extended programming knowledge and yet want to have a highly configurable form. The form configuration is done by special attributes in the html of the form. The visitor of your site will never be able to see these attributes.
On this page a basic PHP script will be presented to switch between a mobile and desktop version of a webpage. The main target for creating this script was to present a working model that can be used for educational purposes. This way it may become clear how such an approach can be realized and students can experience the main functions that we like to emphasize as important, which are:
- it automatically detects what kind of browser a visitor uses;
- it presents the appropriate version of the webpage for desktop and mobile;
- the automated presented desktop and mobile versions of the webpage will use the same filename (One Web);
- the script allows the visitor to overrule this automatically determined choice;
- the visitor's preference will be stored in a cookie so that at a next visit with the same browser he does not need to use the switch again;
- since this last function cannot be done without redirection there is a canonical link to the main version of the webpage present (One Web).
AppCache can be hard to deal with. Browsers seem unpredictable in updating the AppCache. This example of a PHP-script (for PHP 5) makes sure the AppCache gets updated when pages have been changed.
AppCache can significantly speed up the loading of the pages of your site and lets visitors surf your site even when they are offline and haven’t downloaded all pages yet.
In this post I'll present a solution to get AppCache functioning correctly (which can be quite problematic). I'll conclude with some interesting facts about AppCache and how different browsers cope with it.