Safari does not remember Scroll-Position on "Back"-Button - javascript

we have some very strange issue in our webshop:
You scroll down in a category and choose a product
After the load of the productdetail page you go back with the "Back-Button" in Safari
Safari does not remember the scroll position and automatically scrolls up to the header. (You can see for less then a second the right scroll-position before safari starts scrolling up to the header)
And now here it gets really strange:
This problem just exists if the "Google Analytics JavaScript" ist loading!
If we reject the cookie for Google Analytics, the problem is not happening. (As I can see from the Safari-Console, the JavaScript of "Analytics.js" ist loading at last)
Do you have any ideas how we can prevent safari from scrolling up to the header after clicking the "Back-Button"?
Do you have any idea how I can debug this issue?
Best regards.

Related

Hidden iframes are triggering page hit counter

I have an intranet site with two hidden iframes that are made visibile once a user clicks on the corresponding nav menu option on the parent page. Both of these iframes point to pages I have created and contain code for page hits. I used lazy loading for each of these, and that prevented the iframe from incrementing their respective page hits until the page/iframe was actually made visible; but running Edge in IE Mode has now nullified that. Loading the site now increments all page hits regardless if the iframes are visible or not.
I've searched all over for any tips or tricks to get this working in IE Mode, but I haven't found anything yet. This all works perfectly in Chrome and Edge, but my company is running Edge with IE Mode; so here I am.... in search of answers. Thank you in advance!

Scroll events stop working in Safari

I am developing a website that has scrolling transitions on the "index" page and then normal scrolling with a sticky navigation bar on other pages. The site also uses ajax to transition from one page to the next. I have an if statement based on if the user is on the index page use the scrolling transitions, else use normal scrolling with the sticky navigation.
The problem I've found is that in safari when I click on a link from the index page, scroll on the new page and then go back to the index page, the scroll transitions are not activated again. In fact it seems that the scroll events I have set up stop working entirely.
However this problem does not occur in any other browser: Chrome, IE, Edge or Firefox.
I don't know if it's best for me to post the code for it on here because it is a bit long. But here is a link to the code: http://www.dreshaddev.dreamhosters.com/layout/js/scripts.js
Here is a link to the development site: http://www.dreshaddev.dreamhosters.com/layout/index.php
I have tried multiple solutions like reinstating the same code after an ajax call and removing event listeners and re-adding them back in. I'm not sure what to do. I am testing this on Safari 9.1.3.

google chrome keeps on loading my site

I'm making my personal website using a lot of jquery and the basic HTML5/CSS3. I just put some $(document).ready(), maybe that's where the issue comes from..
As I'm trying to see how browsers deal with it, I figured out that google chrome keeps on loading (something but what?) the page. I mean the wheel is spinning in the tab panel and at the bottom of the page, I have a bar saying "Waiting for localhost...". I don't have this issue with Internet Explorer for instance.
How can I find where the problem comes from? Is it just a bad interpretation of chrome? The bar at the bottom is actually quite annoying...
I've been through this:
Try to load the page in anonymous mode (⇧+⌘+N) - if there is no spinning
I would bet on an network activity caused by an extension - check the list (chrome://extensions/) and try to disable a few

Google Chrome page reloading on OSX

I am experiencing very strange Google Chrome behavior.
In my JavaScript I have scrollTo on page load that scrolls to particular part.
The code is simple as:
$('body').animate({ scrollTop: $('nav ul').position().top }, 1000);
But the problem is that when it scroll the page Google Chrome reload the page and that JavaScript is not firing again.
Maybe some one experiencing that before and have a solution or an idea why that is happening?
Thank you!
P.S. forgot to give an live example (do not take as advertising) - csspandemic.com
P.P.S. As people suggested it is working fine on Windows and happening only on OSX. (I changed the title.)
Looks like it's a bug in Chrome: http://crbug.com/61674. Chrome isn't reloading the page -- it's restoring the scroll position to where it was the last time the page was loaded. If you scroll to a different position in the page and then refresh, you will see that the jump is to that last position; conversely, if you load the page in incognito mode, it works fine, because there isn't any cached scroll position.
Unfortunately, I'm not aware of a good workaround for this. I tried changing location.hash in an attempt to invalidate the cached scroll position, but to no avail.

Mootools Javascript slideshow freezes after browsing website

Hi I have been using Rokstories, a mootools javascript slideshow in Joomla, I am having a very odd problem with Rokstories in IE . I have uploaded a temp copy to my server to show everyone.
If you click on my link in IE , the page loads and Rokstories works as normal, sliding from left to right every few seconds......click one of the other menu links, then go back to the home page and Rokstories does something very odd, the dots move along to say that it is going between slides, but the actual slide stays put and dont move.
If you clear your cache and reload the page it works fine again until you browse to another menu item and come back, then the problem starts again.
I have tested this with IE8 and get the problem, I have also tried it in Chrome & Firefox and done see a problem.
http://www.key4design.co.uk/test/index.php
The first thing I notice (apart from the Google Maps API key alert) is that IE throws an error:
Line: 989
Error: 'Cufon' is undefined
Looking on Chrome/Safari/Firefox all throw up 404 on cufon-yui.js & /plugins/system/Cufon/key4font_400-key4font_700-key4font_italic_400-key4font_600.font.js
Our experience has been the IE will sometimes fail when JS files aren't in cache when it expects them to be. You might want to fix those first.

Categories

Resources