|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Page refresh help needed
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. ![]() |
|
#2
|
||||
|
||||
|
I don't think this question belongs to this thread (HTML)
Mod is approached to move it
__________________
Akash Dwivedi "Whatever the mind can conceive and believe, the mind can achieve." Feel good.. ![]() |
|
#3
|
|||
|
|||
|
Oops, my apologies if I posted this in the wrong section. I just thought that there might be an HTML solution to my problem.
|
|
#4
|
||||
|
||||
|
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.
__________________
I'd rather teach you to fish than give you a fish. I reserve the right to also slap you with the fish. |
|
#5
|
|||
|
|||
|
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) |
|
#6
|
||||
|
||||
|
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. |
|
#7
|
|||
|
|||
|
Thanks for all your time! After spending a couple hours on Google, I have found a way to do this using PHP.
![]() |
|
#8
|
||||
|
||||
|
Quote:
|
|
#9
|
||||
|
||||
|
Quote:
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?
__________________
Cheers, Jamie # mdb4u | mobile movie database] | Please help to test and promote # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. ![]() __________________ |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Mobile Programming > Page refresh help needed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|