Force Hard Page Refresh on Internal Navigation Menu Items - javascript

I’ve embedded a job board from Lever on my WordPress site using the following tool:
https://andreasmb.github.io/lever-jobs-embed/
The page on which it is embedded is here:
http://1pd.aab.myftpupload.com/careers-test-3/
If you visit the link directly, it loads fine. However if you navigate to any other page on the site, then access it via the main navigation bar (Careers > Careers Test 3) the content does not load. You must refresh the page in order to see the content.
This is the embed code:
window.leverJobsOptions = {accountName: ‘geltor’, includeCss: true};https://andreasmb.github.io/lever-jobs-embed/index.js
Any help identifying the conflict and diagnosing the issue would be much appreciated. I’ve tried disabling all my plugins but to no avail.
As a quick fix, is there a way to force a hard refresh when any nav link is clicked?
Thank you!
disabled all plugins, to no avail. except the core theme plugins which are needed to run the site.

For a quick fix, did you try this?
document.location.reload(true)

Related

AJAX page load for Wordpress

Recently, I came across this website. There, when you click on a portfolio item, you see is a loading text which has covered the item you clicked and the page loads below the header. It doesn't even leave the page to go to the other page.
How can this be achieved. My WordPress site here, I've the look but only the ajax is left. Please help me out if you can, I really have no idea where to go from here :(
I've used the same image from this website. Just for working, will upload mine once done.
There are various plugins available on WordPress plugins repository which will ajaxify your website.
Advanced AJAX Page Loader
Ajaxify WordPress Site
Only thing you need to do is configure the plugin setting properly by specifying the ID of main page content and rest will be taken care by plugin itself.
There is also a jquery plugin available i.e PJAX which you can use and implement as per your requirements.
Hope it helps you.

How to create a sitemap that includes links of the navigation menu?

I have a website in which there is a navigation menu in each HTML page. In order to implement this, there is a JavaScript function that is called and writes the navigation panel with all the links
<!------------------------------------------------------------------------
HEADER Navigation bar
------------------------------------------------------------------------>
<script>
insertHeader();
</script>
Thus, if there is a change, it is done only in the JavaScript file and is automatically applied to dozens of pages across the website.
Problem:
I am trying to generate a sitemap with this tool. However, since my navigation panel is not written in the HTML (but inserted by JS), this tool does not recognize the navigation. As a result 99.9% of my website is not recognized. Other tools I saw also behave similar behavior.
1) How can I overcome this problem?
2) Will google crawlers see the other links I have in navigation panel?
This question is very old, but I ran into the same problem as you. I also create my nav using JavaScript. To be able to generate my sitemap, what I did was copy the JavaScript generated nav into my index.html temporarily. Then after successfully running the sitemap generator, the copied nav can be removed from index.html.

WordPress custom theme live preview and customization is not saving current preview

I am developing a website with Wordpress. I am using gt3themes' corp theme. I have managed to customize layout of my site, but when it comes to partners and/or featured posts sections, theme's javascript is not working as expected. You can see the preview of the site. I have tried to deactivate the all of my active plugins, but it still not working. However, when i live preview my theme, it is showing the layout as expected, but when i save and publish it, it is becoming as before.
Before activation
After activation
As you can see here, in the first image, it is a live preview and, for example, Our partners section is showing only 5 partners and the rest of them are hidden. Whereas, in the second image, all partners in this section is visible, just overflow made hidden.
The same problem with Latest News and Announcements section.
I have reviewed javascript files, and cannot differentiate from theme's live demo which you can find here.
Any suggessions that can solve my problem would be highly appreciated.
Thanks.
I´m actually not really sure how we would be able to really help you without the files of the theme. Altough i just had a quick overlook between your website and the theme preview at http://www.gt3themes.com/wordpress-themes/corp/, and it seems to me you have a problem with the carousel control, that is on the right side of the partner section in the preview.
also you have more js loaded than their preview.
Looks like a typical failure of some javascript not loaded right or not loaded at all.
Also you are loading two times the jquery library in different versions, one in the header, one in the footer. Try to solve this issues.

Providing a back link inside of a Facebook tab

I'm trying to use history.back() inside of my Facebook app to go up our site hierarchy since the browser back button is obviously useless in this sort of situation. I'm using javascript to avoid having to manage history site on the backend but it's proving to be very buggy. Clicking a link with href="javascript:history.back()"causes the page to scroll around a couple times then actually causes top to go back...
Any help with this subject is greatly appreciated.
So it turns out that history.back() is not possible due to the way Facebook hacks around with the iframes that run apps. I ended up having to implement a pseudo-back link via an implementation in the server-side framework I was using.

How do I achieve the "GitHub browse repo effect" (update URL without refreshing the page)

When I browse a repo in GitHub (example: https://github.com/sizzlelab/kassi) and click a folder, it loads the folder with a cool javascript animation, moving stuff to the left, instead of reloading the whole page. However, the URL of the page is still updated on every click.
How do I achieve this? To my knowledge, you cannot update the page URL from javascript, so you need to refresh the page. My guess is that they do a partial caching of the page so that it does not seem to reload and then run the javascript animation after reload. Am I on the right track? Any pointers on how this can be achieved? My environment is jQuery and rails, but a general advice will help also.
what you want is watch this screencast: http://railscasts.com/episodes/246-ajax-history-state
in combination with jQuery UI effect "slide" - http://docs.jquery.com/UI/Effects/Slide
good luck!
You can read about this behaviour in spec — History API and on MDN in section "Adding and modifying history entries".

Categories