views:

69

answers:

5

For instance, on most blogs you can click on an article and it will take you to the article without refreshing the banner at the top or the navigation bar. I always thought that this was done with javascript, but I found that these websites still work even when I disable javascript.

Similar questions were asked here and here and the answers are all about javascript. But how are websites (Wordpress, for example) doing this when I have javascript disabled?

+2  A: 

It is done with frames. This is a very basic code for accomplishing that:

index.html:

<frameset rows="100,*">
   <frame src="header.html"></frame>
   <frameset cols="300,*">
      <frame src="menu.html"></frame>
      <frame src="content.html" name="content"></frame>
   </frameset>
</frameset>

menu.html:

<a href="page.html" target="content">This will be opened in the content frame</a>
Lekensteyn
I can't find the word "frame" anywhere in the source code of a wordpress blog. Is it because there is some other way to do frames without the word "frame"?
lala
wow. old skool!
BritishDeveloper
@lala someone could write a theme utilizing an iframe but it wouldn't come with the WP core files (they have several default themes but they don't have iframes).
Hans
A: 

If you have javascript disabled, it may be a flash animation that can update without using js.

Hans
Doesn't flash depend on JavaScript?
ILMV
No it doesn't, but it is often generated with JavaScript.
Lekensteyn
+2  A: 

iFrames with hidden borders is normally how this is done.

They can be programatically refreshed, and are simpler when the data you need to display can just be grabbed from a whole different page

Tristan
+2  A: 

In some cases this behavior is just the browser caching the layout of the website. If everything remains the same on the next page except for one article, it will seem to the eye as if only this article is refreshed. This is because it takes milliseconds to load the images from your harddrive while it takes seconds to load an image from the web. This is why you don't see them loading again, while they actually are. It just goes too fast.

To figure it out if this is it, you could clear your temporary internet files and click on another link again you should see that the website actually completely loads again.

As others have said, iframes can be the cause too but I don't think they are used very often anymore. They aren't used on the wordpress.com website anyway. (View Source > Find iframe)

Peter
Arrrgh, you're right. I didn't believe you because it transitions the blog entry so smoothly and I thought I would at least see a flash as the picture reloaded. But I experimented with your suggestion and apparently the whole picture does indeed reload.How disapointing and embarassing.
lala
Yeah, the web acts in mysterious ways sometimes ;-)
Peter
A: 

As a WordPress user I can assure you that it is JavaScript.

Tokk