Questions tagged [pageshow]

an HTML5 event or a jQuery Mobile event relating to pages. The HTML5 event is triggered when a session history entry is being traversed to. The jQuery Mobile event is triggered on the toPage after animation completes.

an HTML5 event or a jQuery Mobile event relating to pages. The HTML5 event is triggered when a session history entry is being traversed to. The jQuery Mobile event is triggered on the toPage after animation completes.

17 questions
11
votes
3 answers

JavaScript - bfcache/pageshow event - event.persisted always set to false?

In a standard Java / SpringMVC / JSP / jQuery web-app, I'm trying to detect a "Back" (or history.go(-1)) event, in order to refresh (AJAX) a summary component/panel content when I return to a page (where we can change the backend data that is…
Eoin
  • 171
  • 1
  • 2
  • 8
10
votes
5 answers

When does PageTransitionEvent.persisted evaluate to true?

I'm trying to detect if my current page is loaded from cache or is a fresh copy. I have the onPageShow callback registered on my body tag. I can see it being triggered, but I cannot produce a circumstance where the event.persisted is actually…
SnelleJelle
  • 825
  • 4
  • 18
  • 33
6
votes
2 answers

How to prevent reloading of web page from cache while using mobile safari browser?

Mobile Safari uses a special caching mechanism Page Cache (here) which basically keeps the current page alive but hibernated when we navigate to another page. This way, it can immediately display the previous page in its latest state when user…
Bakhshi
  • 1,239
  • 12
  • 25
3
votes
0 answers

pageshow and onpopstate not work in ios

When I click a button to submit something it will have a function to show a div $("body").append('
howard
  • 31
  • 1
3
votes
3 answers

jQuery Mobile Dialog on page load

Working on my first jQuery Mobile app. There is a localStorage value that must have a value throughout the application, so I tapped into the pageshow event to check this value: $(function () { $("div[data-role='page']").on("pageshow", function…
tjc59
  • 613
  • 7
  • 24
3
votes
2 answers

What is the difference between html pageshow and load events?

HTML5 has a pageshow event. In what instances does it work differently than the body's onload handler?
Ben McCann
  • 16,431
  • 22
  • 74
  • 96
2
votes
1 answer

JQuery Mobile, redirecting by window.location prevents pageshow event

I have a JQuery Mobile application with many pages linked to each other. If I put a link on page A and set the href to page B, this script works fine: $(document).on('pageshow','#pageB',function(){ alert('hello!'); }); But if I put a button on…
themehrdad
  • 169
  • 4
  • 10
1
vote
1 answer

pageshow's event listener on a React component not working properly

I have the following scenario where I need to run some "code" when entering a page for the first time or returning to it from another page. Safari's cache feature (https://webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/) is causing that,…
TheNurb
  • 365
  • 1
  • 13
1
vote
1 answer

Missing PageShow event in Android 2.2

I have an issue i've been encountering with Android 2.2 and 2.3.3 avd/phone but not if i use intel atom image for avd. I'm using phonegap 2.3.0 and jqm 1.3.0. I'm missing a pageshow event on a page and my application gets broken meaning navigation…
0
votes
1 answer

html page is loaded from disk cache but event.persisted is false

I have this to my javascript file: window.addEventListener('pageshow', function(event) { if (event.persisted) { console.log('Page was loaded from cache.'); } }); but if i navigate to another link and then hit back button, my html page is…
christk
  • 495
  • 5
  • 15
0
votes
1 answer

jquery mobile pageshow function firing twice

I have a main page with two internal pages. Each time I attach events on each $(document).("pageshow","pageXXX",function(){ alert("This is a test") }) The alert gets fired twice on the main page, also, when I call the internal pages the custom…
0
votes
1 answer

in JQM pageshow works, pagebeforeshow doesn't

hi I have some jQuery Mobile and pageshow works fine (it's blip bugged but it works fine) like this: $(document).off('pageshow').on('pageshow', function () { console.log('it happened'); }); NB: I have had numerous (READ: weeks lost) problems…
user26676
  • 270
  • 2
  • 18
0
votes
0 answers

Pageshow not working only on android device

my code work fine on webbrowser and iphone, but page (#fichier_clients) leave blank on android devices. help be very appreciate, html
gouly
  • 5
  • 4
0
votes
1 answer

jquery image load function not being called properly

I am having the following issue in a mobile web application I am developing: In javascript, I have a Image() control and I have an event attached to the image control that should fire when the image gets loaded. Inside of the "pageshow" event for…
Obi Wan
  • 889
  • 10
  • 26
0
votes
1 answer

jquery image.load event not firing if image.src set from pageshow event and returning to the same page

I have the following situation in my mobile web application: I have a javascript Image on the page called srcImage. I have javascript code that is set to fire when the javascript image gets loaded. My understanding is that this event should be…
Obi Wan
  • 889
  • 10
  • 26
1
2