Click to See Complete Forum and Search --> : How come the URL does not change?
Aspiring
04-20-2010, 01:59 PM
In some web sites (for example, http://www.nepalisandesh.com), when a particular page or file is opened, the URL still remains same. No matter which page is opened within that site, the URL is same as when it was with the Home Page. (for example the URL is always http://www.nepalisandesh.com ) Normally, when different page is opened, the URL is supposed to change. For example, when "About us" is clicked, the URL should normally change something like this: http://www.nepalisandesh.com/aboutus.html, for example.
I am wondering if someone could explain me how this is done, and which technique is used so that the URL remains the same all the time despite the openings of different pages within the site.
Thank you.
Shorts
04-20-2010, 02:19 PM
Well, I'm not sure why, however that site is using Frames. The pages are changing, however you don't see the url change as it's really just that single frame changing. HIGHLY suggested you do not do that.
Another way to do a similar interaction is via AJAX. Which is a mixture of things, pretty much the site makes a call to the server for the new page and through JavaScript the page rerenders what it is told to. For switching pages this is completely unnecessary unless you have something like an messaging system on the bottom. And if AJAX is being used you should still have a regular version of the site for users without JavaScript or for users that link to open links in a new Tab\Window.
Aspiring
04-20-2010, 02:27 PM
Well, I'm not sure why, however that site is using Frames. The pages are changing, however you don't see the url change as it's really just that single frame changing. HIGHLY suggested you do not do that.
Thank you Shorts.
That site is for News. When each headline is clicked, it the news related to it opens but the URL still remains same. Please let me ask you if it is a suitable approach?
May I also ask you why you strongly suggest not to do that (use of Frames)?
Thanks you once again.
Shorts
04-20-2010, 03:30 PM
If you right click and open in a new tab\window you'll see the actual page you are going to, (e.g. http://www.nepalisandesh.com/new/detail1.php?cat_id=16) It would be better to link directly to that page instead of inside the frames.
One reason, bookmarking. If a page is in a frame, when you bookmark it you can only bookmark the framed page, not the pages inside. This makes usability for the end user hindered with zero benefits. Another aspect, frames and search engines don't always get along which can leave many pages on your site from being indexed properly.
Aspiring
04-21-2010, 07:55 AM
Thank you for your further explanation which has been of great help to me. I am glad I came to the right place and the right person.
Aspiring
04-21-2010, 07:57 AM
Secondly, thank you so much about the "right click" tip. Yes, it does show the page URL you are going to. Great to know it thanks to you!