1

Not sure if this should be here or the Android forum - really depends on the solution.

I'm having an issue with numbers or hash-like characters randomly being added to my PHP pages. This only seems to occur on all Android browsers.

A simple test page, where the only content is the word 'test':

example.com/test.html

vs

example.com/test.php

Both render as expected in other browsers, resulting in the plain page with 'test', however the test.php page, when viewed in any browser on Android (Chrome, Android Default, Firefox, Opera) renders 'test0'.

It is adding the '0' and I'm not sure why. For my far more complex PHP pages, it actually adds a bunch of characters that look like a hash. It appears for a second before the HTML content loads, then gets dispersed randomly in the page breaking everything.

Is this a server issue or an Android bug? Any thoughts?

masegaloeh
  • 18,236
  • 10
  • 57
  • 106
John
  • 121
  • 5
  • 2
    Works fine on Android. The problem is going to be your specific device or your carrier/ISP. – Michael Hampton Sep 20 '14 at 02:32
  • @MichaelHampton I've tried it on 4 different Androids, 2 are HTC One M8's, one is a Galaxy S3, and one a Galaxy S2. I've tried it on WiFi through Comcast and Brighthouse as well as mobile data via AT&T. The issue happened a few months ago, then went away then came back this week. Do you mind posting a php test page I can see if it is unique to my phone setup? Seems like someone somewhere is pushing updates in the background. – John Sep 20 '14 at 02:42
  • 1
    You might need to run packet captures at your server and on or near your device, to see where the bonus characters are coming from. – Andrew Schulman Sep 20 '14 at 06:54

1 Answers1

1

This was caused by AT&T. Fixed it by forcing no transform on the headers cache control of the php documents.

See this post: https://stackoverflow.com/questions/25600332/ios-web-page-errors-over-cellular-data-but-not-over-wifi-recent-change-to-att

In my case I added the following to the .htaccess file to fix it globally:

Header set Cache-Control "no-transform"
Header set Content-Type "text/html; charset=utf-8"
John
  • 121
  • 5