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 8426343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:31:00+00:00 2026-06-10T04:31:00+00:00

Is it possible to have a normal link pointing to the current location? I

  • 0

Is it possible to have a normal link pointing to the current location?

I have currently found 2 solutions, but one of them includes JavaScript and in the other you have to know the absolute path to the page:

<a href="#" onclick="window.location.reload(true);">1</a>
<a href="/foobar/">2</a>
<a href="#">3 (of course not working)</a>

Is there any way of doing this, without using JavaScript or knowing the absolute path?

  • 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-10T04:31:00+00:00Added an answer on June 10, 2026 at 4:31 am

    I have been using:

    <a href=".">link</a>
    

    Have yet to find a case and/or browser where it does not work as intended.

    Period means the current path. You can also use .. to refer to the folder above the current path, for instance, if you have this file structure:

    page1.html
    folder1
        page2.html
    

    You can then in page2.html write:

    <a href="../page1.html">link to page 1</a>
    

    EDIT:

    I’m not sure if the behaviour has changed or if it was always like this, but Chrome (and maybe others) will treat periods as described above as regarding directories, not files. This means that if you are at http://example.com/foo/bar.html you are really in the directory /foo/ and a href value of . in bar.html will refer to /foo/ rather than bar.html

    Think of it as navigating the file system in a terminal; you can never cd into a file 🙂

    EDIT 2:

    It seems like the behaviour of using href="." is not as predictable anymore, both Firefox and Chrome might have changed how they handle these. I wouldn’t rely entirely on my original answer, but rather try both the empty string and the period in different browsers for your specific use and make sure you get the desired behaviour.

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

Sidebar

Related Questions

If I have a texture, is it then possible to generate a normal-map for
Is it possible for the apache2 user, http, to have environment variables like normal
For a normal C++ function, it's possible to have template parameters not appearing in
I have a normal GroupBy operation on an enumerable: e.GroupBy(i => i.Property) But if
Is it possible to have Android's numeric keypad display for an EditText (the one
I have links to mp3 files on my website (normal <a href=file.mp3> tags). But
I have a link: <a href=# id=link>Here's my link</a> This is not a normal
I want my HTML page to load like normal, but I want one section
This is a nasty one. I have an external link. <a href=http://www.example.com target=_blank> now
Is it possible have two projects with the same name in flex builder? Here

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.