Wednesday, December 28, 2011

Android - HTML Query String Issue

It seems that from Android 3.0, passing value from query string from HTML is broken.

HTML query string is in the form of index.html?name=someone

Personally, I had tested it and I could not get it work for Android 3.0 and above platform. In the past, Android 2.XX work well. It seems that the issue persist on Android 4.0

To workaround this issue, you could use HTML5 Web Storage. There are plenty of information regarding how to use HTML5 web storage.

But, using web storage only solve part of the problem. When we use HTML query string, what we want to achieve is load dynamic information on the same html page that have common code.

Web storage does solve our passing of information issue, now, we have to solve the displaying issue.

Why would I say displaying is an issue?

1. The html page is cached
2. HTML DOM object is loaded and does not refresh. (jQueryMobile does have this issue)

For HTML page is cached, you can use window.location.reload() to force a refresh

For inner HTML DOM reloading with jQueryMobile, you can use $.mobile.changePage with reloadPage: true as option.

1 comment:

  1. Useful article. I hope the bug will be fixed, at least in ICS...


LDAP - Deleting an LDAP entry

To delete an ldif entry, one way is to put an changetype attribute and a value 'delete' in the ldif file For example dn: cn=so...