Fail downloading file on Android

How hard is it, to write a PHP script to allow user to download a file? really easy, one would say. Just send the appropriate HTTP header and echo the file content.

Basically that’s all I need to force download per PHP. But somehow Android stock browser (Chrome) only downloads and creates a 0 kB file. Other browser (tested with Firefox on Android) saves the file correctly.

What does happen here?

Continue reading Fail downloading file on Android

SEO – add trailing slash to URL

The problem

For those who use Google Webmaster Tool, they might find Google “duplicated content” warning. This is caused by slightly different URL, which is found by search engine.
Like:

and

are interpreted as 2 different pages by search engine. So how do we resolve this?

Continue reading SEO – add trailing slash to URL