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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:39:19+00:00 2026-05-27T12:39:19+00:00

I am building the fragment string in javascript from a form and setting with

  • 0

I am building the fragment string in javascript from a form and setting with window.location.hash. If a user leaves a form input blank the resulting URL can be

example.com/#search/cars//blue//mazda

Note the //

If say the price was entered it would be

 example.com/#search/cars/20000/blue//mazda

Now this works fine. Is it bad practice?

  • 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-05-27T12:39:19+00:00Added an answer on May 27, 2026 at 12:39 pm

    I think that pushState and the other History API methods are so nascent that standards haven’t yet evolved. As opens a recent W3 work on Repurposing the Hash Sign for the New Web:

    The Hash sign (#) in a URI was originally used to introduce a static
    “fragment identifier”, but recently it is being used in many more
    complex ways as it is set by and interpreted by JavaScript in Web
    applications.

    It might violate normal behavior to use double slashes in the pathname but the hash fragment can be any arbitrary string. Do a typeof and you’ll see it’s just a normal string. It’s not standard and therefore might alienate the typical user experience. Code wise, however, I think you can feel free to you double slashes, triple slashes, or anything else.

    One thing to keep in mind is that escaped characters are decoded when read from the window.location.hash property.

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

Sidebar

Related Questions

Building a Django app on a VPS. I am not very experienced with setting
I'm building the example shown in this tutorial: http://thepseudocoder.wordpress.com/2011/10/04/android-tabs-the-fragment-way/ And I'm get some errors
I'm building a website at the moment, I've some html fragment that is being
I'm building an application using a service and the fragment compatibility pack and am
building on my last question jQuery getting values from multiple selects together I have
Building a simple login page. If the user types in a password and password
Building my baseclasses for user interface controls is getting there. I have command buttons
building upon the $.fn.serializeObject() function from this question , i'd like to be able
Building a solution from Visual Studio in mono develop seems to have some issues.
Building an app with the Facebook JavaScript API that will embedded into a page

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.