Hi I have following code that reloads the page based on route
$location.path('/chartpage');
$route.reload();
It works fine but I want to do further two things
Load the page in new tab or browser window
Anytim I reload the page again it reloads the same browser.
Idea is that on my current page as the numbers are changed I want this other browser to reload to show the chart wit changed values.
Thanks
Related
enter link description here
When I navigate to different to different pages after the initial load, the app works perfectly fine. But When I refresh the same URL or copy and paste the same URl the page fails to load.
The problem is when I copy the same URl and open in another page, or refresh the same URl, the link will not work?
example: http://livexcellence.com/readytomove will not work if you try to open the link directly. Although the above link is with the websiteitself
I am able to access the correct page on http://livexcellence.com/#readytomove. Since you are using react routing regardless of you hosting the page
I'll show you a use case with Angular & ng-infinite.
I've scrolled for 2 pages, so I've pages 1, 2 and 3 loaded in my SPA.
The url reflects the page navigation, so page=3.
Now I want to refresh the page: i'd like to have in my page only items of page=3.
The problem is that the browser remembers the previous scroll position of the page reloaded.
So this is what happens: items of page=3 are correctly loaded (OK), browser remember scroll position, it goes to that position (bottom page) and this triggers nginfinite -> ajax call for the page=4 (NOT OK).
If I were on the top of the page before refreshing the page, refreshing the page wouldn't trigger nginfinite.
So it depends from the scroll position of the page before it has been relaoded.
I tried with window.scroll(0,-500000) with no success.
Any suggestions?
I think it seems like you need some browser persistence to help you out on this one.
When you refresh the page you lose everything you know about the app before the reload and so you cannot make any difference out of normal first time behaviour and undesirable reload behaviour.
Put your current Page number into localStorage and check localStorage when your app start up after reloading.
I am getting data properly from the database and displayed in the JSP page for the first time. When I Refresh the page the page appears blank and continue to show blank data even I refresh again and again. To get proper data, I had to close and open the JSP page in a new window. What is the problem?. I am using tomcat Server.
I have a page where I reload most of the page with AJAX, including a couple ads, on a page click. This page click often changes the location targeting (i.e., the user clicks the 'Texas' button). So, on the part of the page that is loaded with AJAX, I'd like to update the ads with the new location.
In the docs on updateCorrelator, I am given the impression that I can use this on an AJAX load to update my ads with a new location using the setLocation function. I see in my console that both updateCorrelator and setLocation are being called before the refresh function refreshes the ad on the AJAX page update. However, unless I actual do a manual refresh of the whole page, the ads I am loading are targeting the old location still.
How can I display ads using the new location parameters without refreshing the whole page?
Any help is appreciated, thanks in advance.
I have an HTML page. Everytime I add new content to the page, the user needs to refresh the page in order to see the new content.
What I want to do is to refresh the page automatically for them regardless of browser.
I tried putting the following but the screen flickers so many times that it does not prove to be useful:
<script type="text/javascript">
location.reload();
</script>
The JavaScript you show there does indeed reload the page. Every single time the page loads, as soon as it reaches that JavaScript. The flickering you're seeing is probably the fact that it in an infinite cycle of reloading. What you need to do is perform an AJAX request to the server to find out if there is new content, and then reload the page if there is. Or, alternatively, use the AJAX to actually update the new content on the page.