Hi everyone--
I am developing a jokes site designed for mobiles. The address is JOX.MOBI. Everything is just fine except for the page refresh. I want to have it so that when a user clicks my "Next" link, the page is refreshed, which would recall a new joke using my php script. That all works fine as I have it when viewed in a standard browser, but when I test the site on a mobile emulator, such as the one here...
mtld.mobi/emulator.php?emulator=nokiaN70&webaddress=jox.mobi%2Fshort.php
...the page content does not actually refresh, which means that the joke does not change. I think it must be due to the cache used by mobiles.
Anyways, I need to figure out how to actually reload a page by clicking a link. Or perhaps telling the mobile's browser not to store a cache for the site? Oh, and Javascript doesn't seem to work on mobiles?
Sorry if this doesn't make sense. I'm not much of a programmer.....and it's 3:24 AM.

I don't think this question belongs to this thread (HTML)
Mod is approached to move it
Was this answer helpful ?
Yes No
Oops, my apologies if I posted this in the wrong section. I just thought that there might be an HTML solution to my problem.
Was this answer helpful ?
Yes No
I'm not familiar with mobile web use, but most smaller phones probably don't have any Javascript to both cut down on development issues and stop issues from the small screen. I can't access the page from work, so how are you trying to refresh the page? It would probably be better to just have the page link back to itself. I imagine META no-cache is supported, but it may not be; if it's not, you can simply append a random GET variable (i.e. post.php?rand=3445) or use a number of other methods to stop caching.
Was this answer helpful ?
Yes No
Thanks much for the reply! I have tried the META no-cache thing, but that just doesn't seem to work. Perhaps there is something wrong with my code? Feel free to take a look at my site's code and try to find a solution!
I also tried the random GET variable, and that *sortof* works. When a user clicks the link with a random variable (i.e. short.php?rand=3445), the page is in essence reloaded. However, that same link of course appears and the page simply links back to itself. Is there a way to automatically generate a random number? (short.php?rand=4892....short.php?rand=5028....short.php?rand=9472....etc)
Was this answer helpful ?
Yes No
Instead of using a random number, you can either use some incrementing value (tracked somehow), or, probably better, just output the current time in milliseconds for the rand value. I believe this will be sufficient for just about any visitor.
Again, I can't check your META refresh at your site, you'll have to post the code here. But that link I gave you has an example, so if it deviates greatly from that something is probably wrong. You should also look for some sort of documentation for the cell phone you're testing, and see what they include for their web browser.
Was this answer helpful ?
Yes No
Thanks for all your time! After spending a couple hours on Google, I have found a way to do this using PHP.

Was this answer helpful ?
Yes No
Quote:
| Originally Posted by Egnited Thanks for all your time! After spending a couple hours on Google, I have found a way to do this using PHP.  |
It'll be good to post what you've found so people who searched the subject next time will find the answer quickly.
Was this answer helpful ?
Yes No
Quote:
| Thanks for all your time! After spending a couple hours on Google, I have found a way to do this using PHP. |
Hi Egnited, welcome to Dev Shed.
This is a community forum. One of the things that makes this place so successful is the people sharing information.
How about you sharing your method for the help of others here?
Was this answer helpful ?
Yes No