Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8448739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:30:37+00:00 2026-06-10T10:30:37+00:00

I have a main page index.html. This main page is the enterance to the

  • 0

I have a main page “index.html”. This main page is the enterance to the site which is done in HTML5. There are other pages for the site:

“about.html”, “work.html”, “portfolio.html”, “contact.html”

So all of these pages have a div called “contentDiv” which has the copy/text accordingly. User enters the site via “index.html” and if user clicks on one of following the nav links:

About | Work | Portfolio | Contact

“index.html” page loads the content of clicked page’s “contentDiv” using JQuery’s load() call and then slides in the loaded div using animation.

Site is backward compatible so if Javascript is disabled then user is taken to the clicked page instead of having the “index.html” to load the content via load() call.

By the way, the nav link(s) are coded like this:

<a href="about.html" title='About'>About</a>

Once the “index.html” loads the requested content, By using pushState(), the URL is updated. So if user clicks on “about” link then pushState() updates the URL to:

“http://www.abc.com/about.html&#8221;

The reason I have not inserted any hash into the href tags, because I want the site to have a fallback just in case if the Javascript is disabled. This way, user can be directed to the requested page (‘about.html’) instead of “index.html”.

So far all works well as expected however here is the issue. When user is on “index.html” and clicks on anyone of the sections for example “about.html”, content is loaded and URL is updated via pushState(). So now the URL is “http://www.abc.com/about.html&#8221;. Now if user refreshes the page(“index.html”), “about.html” is loaded instead of “index.html” doing the load() calls.

Lets say if I code the nav href tags like this:

<a href="#about" title="about">About</a>

then the URL ends up having a hash in it. And if I copy and email the link “http://www.abc.com/#about&#8221; to a user, and if user tries to open the link via browser with javascript disabled then user will not be able to get to “about.html” because link only has ‘#about’ instead of “about.html”.

What I am trying to do is indeed doable I just don’t know how to approach it. If anyone can help me on this that would be wonderful.

Forgive me, for such a long description.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:30:39+00:00Added an answer on June 10, 2026 at 10:30 am

    I ended up setting all the nav hrefs to “”. and then setting the hrefs values on document.ready() function.

    $('a[rel=nav]').attr('href', '');
    

    Thanks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an PHP/HTML main page, in which I include different other PHP files
i have this main page index.html <script> $(document).ready(function(){ $(#content).load('page.html'); $(#menu).click(function () { alert('Hello'); });
I am using jQuery for a simple website and have a main page 'index.html'
I have a index.php page that is the main page. All pages are included
On my main page I have this jquery code which does an ajax call
I have a page (index.html) which has a frame: <html> <body> <iframe src=otherPage.html />
This is for a simple web-page assignment. I have a few pages on which
My question is this, if I have a page say index.HTML that has some
i have this code in indexSucces.php //some html for the main page <td width='48%'
I have a page (main.php) which loads content from an external PHP file (rpc.php).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.