AngularJS - Erroneously Refreshing DOM - javascript

I've found a rather complex issue with my angularJS SPA website that I can't seem to find a solution for. When I go to the page for the first time (in chrome incognito mode), everything loads fine. However, when I click on a button to go to another page on my site, the DOM gets reloaded. This is a problem because I have some local values that I need to retain their values. I can't pinpoint an exact area in my code that's causing this to happen. Has anyone else had this problem before? Any help is much appreciated

Related

Need to make browser back button go back to previous page root url sitewide on Wordpress

I have a particular problem on a site that I'm working on and can't seem to get things working on Wordpress. I have a tab section of the site that uses # to function properly. I also have anchor links to these sections as well. Everything works great, but when I navigate off of the page and click the browser back button, I have to click through each # until I get to the root page. I realize that this is the normal browser behavior, but need to find a workaround if possible. I've tried all sorts of code, and could post some things I've tried but nothing is working thus far. Any help would be greatly appreciated.
Thanks so much

Next.js page rendering glitch when refreshing pages

I'm having a weird problem that I originally just dismissed as a development glitch, but now I'm more concerned because It happens every time I refresh the page.
The issue is when I navigate to another page (localhost:3000/otherpage), sometimes it wont render that page at all. The page will turn completely white and have no HTML elements on the page (according to the dev tools inspector). However If I'm on that page and refresh this will always happen. Theses pages are dynamically rendered pages that have logic written that tells them to load a skeleton page while fetching the data, or render an error page if there's a problem with the request. I'm stumped as to why this is happening and have not been able to find anyone else that has experienced this problem yet.
My question is:
Why does this happen? and how can I work around this?
I have a screen recording to better explain whats going on.
(link to unlisted video):
https://youtu.be/mJPp3P4ElsI

Getting the contents of Chrome's console with JavaScript

First time poster. Currently trying to work on a project but I am having an issue with iframes. I'm making an extension for Chrome, and part of its functionality right now is to be fetching any shapes/borders on a page. Unfortunately, that also includes ones within iframes. I'm currently stuck because I cannot get around security policies from Cross-Domain sources.
I was wondering, however, if it is possible to create a function that displays what the Chrome console does when I hit "inspect element" on a page... I tried to make a console function called "save" that would automatically download a file of anything output to the log, but the output for the iframe's HTML is blank except for its tag...
When I am inspecting an element on the page, I can see the contents of that iframe just fine. Is there anyway to just get the actual text from Inspect Element and store that? I know this may be silly, but I genuinely have no idea. I am pretty new to JavaScript. I just need to match up script tags for shapes for part of the extension's functionality.
I'm assuming that this is going to end up being impossible, but I figured I'd ask. I'm also assuming that this inspect element functionality is something that only the browser can work with. But hey, maybe there's a way. Thanks for any help.

How to stop page from redirecting to the previous visited page?

The issue i have is that when i click on any page in my menu, it loads and then goes back to the previous page i visited. I contacted my hosting provider and they said there must be some code somewhere inside the website or database. But i know for sure i didnt put any code in there. Does anyone know where i could find this code or where the problem could be?
I already tried changing the permalinks and all, but this didnt work.
I expect the page to just normally load into my browser window without redirecting to the previous page.
URL is: http://www.vandeheg.nl/
From what I can see this is a problem with the JavaScript on the site, as with JS disabled I can access all the pages without issue.
I'd recommend trying with all plugins deactivated, and then if that doesn't solve the issue have a look through your theme code for anything like window.location that might imply a forced JS redirect.

javascript - different behaviour on page refresh

I have a really weird problem.
I have a site (running wordpress), and I use jquery roundabout plugin.
When I visit the site with the address bar, the site is displayed fine. When I'm already in the site and I hit refresh - everything is messed up. I checked in both chrome and firefox, and I get the same result. In IE there is no problem.
Also, I noticed that the problem occurs only when doing a soft refresh (F5) and it's ok when doing a hard refresh (Ctrl+F5)
You can check for yourself in my test site
http://50.112.34.111
try to press enter in the address bar a few times - should display ok. try to refresh - and you'll see the problem...
First of all I would try to put the JS includes (<script.../>) in the header AFTER all CSS includes! That might already help. Since the CSS might influence your JS, JS has to know all CSS before it gets loaded.

Categories