Tag: dev

  • Easy mobile browser detection for several major languages and web servers

    All app’s and websites these days need to work for several devices including desktop, tablets and mobiles. It’s not always simple detecting the type of device being used and it can sometimes be tedious adding support to your app for something which seems very simple.

    Does your chosen platform not have a pre-defined way of detecting a mobile browser? Check out Detect Mobile Browsers, has several copy / paste examples for several programming languages.

    http://detectmobilebrowsers.com/

    Remember Apache, IIS and nginx detection examples also present for doing for pesky redirects.

  • Progressive JPEGs for fast website image loading and ux design

    Want to Speed up your website images and improve user experience? Make sure you use progressive JPEGs (or interlaced JPEGs), it could help make your website load faster and retain visitors for a longer duration.

    Take a look at the example below showing a normal baselayer JPEG and a progressive JPEG LOADING side by side.

    http://pooyak.com/p/progjpeg/

    Instead of delaying page loading for high quality images, we can display lower quality and load the high quality whilst the user can still browser, view, read and purchase. Remember your visitors may be on a slow mobile connection! They don’t want to wait!

    Some further reading? Take a look at the website below.

    https://www.thewebmaster.com/dev/2016/feb/10/how-progressive-jpegs-can-speed-up-your-website/

  • PHP: Show PHP errors messages for debugging code

    PHP: Show PHP errors messages for debugging code

    Need to easily debug some php code? simple add the following code to your script to enable PHP error reporting and display error messages. This allows you to quickly debug without making configuration changes to servers PHP configuration.

    It is good practice to hide error messages for security reasons, error messages could be used by hackers to gather information and vulnerabilities.

    This code is provided as it and may require changes to work for your needs.