Solved

Refresh problem with frames

Posted on 2001-07-30
5
329 Views
Last Modified: 2008-03-10
Hello

I'm creating a site with frames.
Top frame, left frame and main.

My problem is when i navigating in my pages an i press the refress button then i loose all my variables and the page is at the beginning index.php. Is it not possible when de refresh button is pressed that only the main page refreshes???
0
Comment
Question by:Seever
  • 2
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 50 total points
ID: 6333773
From what I can tell, most browsers refresh the URL in the address bar (or whatever it is called where you see http://www.mysite.com/index.php).

If you are using frames, then refresh ignores them and looks at the parent frame and refreshes that.

If you are losing variables, then add them to a session.

PHP 4's sessions are very good. They do what I want.

Using sessions will allow the variables that are present in the frames to remain available to your PHP script, even if the user presses refresh.

I hope this helps,

Regards,

Richard Quadling.
0
 
LVL 8

Expert Comment

by:us111
ID: 6336935
Remove the frames :)) This is not an answer but just a suggestion
Frames are really bad with navigations. You always have problem with cache
And most of search engine (spider) doesn't index site with frame. They only index
the homepage
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 6336962
In answer to us111's point about frames ...

They CAN be used REALLY badly, but, with a little knowledge about what a spider is doing, you can handle them.

Normally, your main page will contain something like this ...

<html>
<head>
<title>Title</title>
<meta name="robots" content="follow,noindex">
</head>
<frameset>
 <frame ...>
 <frame ...>
</frameset>
<noframes>
This site uses frames.
<a href="/robot.html">My links</a>
</noframes>
</html>

This will tell search engines (those that obey the META tags) to NOT index this page, but to follow all links.

The only link available is robot.html.

This file contains a simple list of all the pages you want to add to the search engine.

Whilst this is not a total answer, I have found that this works fairly well.

The robots page also has the same meta tag.

I use frames for a navigation panel (take a look at www.ivanpeters.co.uk and www.razorsedge.co.uk - both using Joust navigator - support in the www.delphi.com forums).

Regards,

Richard Quadling.
0
 
LVL 1

Author Comment

by:Seever
ID: 6338720
I had some problems to figure it out how sessions works, but i made it. Thanks
0
 
LVL 8

Expert Comment

by:us111
ID: 6339717
Jacob Nielsen is a web guru.
Take a look at his site, it's really interesting
http://www.useit.com

and
http://www.useit.com/alertbox/9612.html
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question