0

For this question, let's say my domain name is "example.com". So basically I want to manipulate the default anchor snapping technique shown here: http://www.htmlgoodies.com/tutorials/getting_started/article.php/3479511 but what I do not want, is to have what appears to be a single page application.

I know that sounds weird (and maybe a paradox) because a page jump is conventionally used to jump around to parts on a page (like "#home" will take you to the top of the screen and "#about" might take you farther down to a different part of the page as if it a single page application) - similar to example from above.

This is what I do not want: http://www.htmlgoodies.com/tutorials/getting_started/article.php/3479511#bottom Notice it is the same link with the "#bottom" tag appended to it and maybe you could replace it with "#top" to jump to the top.

Websites exist where you have the ability to navigate the same page with page jumps ("#home", "#about", etc.) and some have a landing page with ".../landingPage#signup" and ".../landingPage#login" so it snaps to a certain position in the same page (similar to the HTML Goodies tutorial). These websites make it obvious that you are on the same page with maybe a navbar and ScrollSpy and a "Scroll to Top" button or something that moves your around the same page. I do not want that. I want it so that when a user goes to "example.com/something#home" and compares it to "example.com/something#about", it has no indication that they are on the same page.

I think this is possible in JQuery but I want a backend solution (preferably in Ruby on Rails but maybe the gem AngularJS or something would be fine too as long as the said framework like JQuery is supported in Rails) I say frontend solutions are fine because I understand that requests with the hashes in the front make no difference to a server or even a search engine like Google.

If any of that confused you, then simply said: I want this:

User goes to "example.com/something#home" --> output is "Welcome to home page view"

User goes to "example.com/something#about" --> output is "Welcome to about view"

Thank you

UPDATE I found my question is a duplicate of Adding Hash parameter in the URL Rails Routes It is exactly what I wanted in case you had the same problem that I did.

Community
  • 1
  • 1

1 Answers1

0

It sounds like you want a single page application that doesn't look like a single page application. I would look into using React with React-Router for the page jumps. While React is mainly used for single-page apps, you could just as easily give the appearance of not being a single one.

danmakenoise
  • 294
  • 1
  • 5
  • Thanks for the help Dan, I think you've got me interested in Javascript frameworks now but I found that my question was a duplicate of the following: http://stackoverflow.com/questions/7052399/adding-hash-parameter-in-the-url-rails-routes Anyways though, thanks a lot for the help! – Joseph Paige Apr 12 '16 at 21:58