473,382 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

request for a page using random id to get the fresh copy each time

dmjpro
2,476 2GB
when a page is placed then it can be refresh using JS.

but if i request for a page using AJAX then how can i get the fresh copy every time.

i did that using caching management....
i mean .... adding caching related response headers.
without managing caching , getting a updated copy of a page every time using AJAX is not possible?

plz clear the funda.

regards.
Apr 30 '07 #1
4 1610
iam_clint
1,208 Expert 1GB
sure it is add a random query string to the link

www.blah.com/default.asp?rnd=129039823910

randomize that last number and it should give you a fresh copy everytime.
Apr 30 '07 #2
ohhh .... what a fantastic idea.

thanx ...... lot of thanx.
May 1 '07 #3
dmjpro
2,476 2GB
recently i asked a question ..... how can i get a fesh of requested page each time without using cache management?

then an expert answerd me that using radom id generator .....
http://my_page_name?random_id=a_random_number.

seeing this technique i was very impressed.

but today when i put it into the reality then a question comes to my mind that ....if i use this then my local machine stores each copy having an illusion that user may request for that page with same random number.

then unnecessarily same page will be stored again again .. then to fit the space the local machine may delete some important pages.

so is it a good programming practice ? i m confused.

plz help.
Regards.
May 6 '07 #4
pbmods
5,821 Expert 4TB
recently i asked a question ..... how can i get a fesh of requested page each time without using cache management?

then an expert answerd me that using radom id generator .....
http://my_page_name?random_id=a_random_number.
Actually, we prefer to use new Date.getTime() instead. That way there's no chance of collision, and you can use it to find out your User's timezone for time-based output :)

so is it a good programming practice ? i m confused.
This is (IMnsHO) a hack. If you want to prevent the browser from caching your page, then set the appropriate headers (by default, PHP does this for you automatically).

Here's a really good tutorial on web caching that I found the other day:
http://www.web-caching.com/mnot_tutorial/
May 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad...
3
by: Ron Lessnick | last post by:
I have to continuously download the same web page on our IIS server. It is important to always download a fresh page from the server including not only the .asp page itself but all the .gif and...
1
by: andrewdreib | last post by:
I am still very new to ASP and am trying to create an ASP page that gets records from a database. Right not I can successfully get one field of information at a time and randomize it, but I need...
10
by: Bo Rasmussen | last post by:
Hi, I have a problem : I have a form with some buttons. When one of these buttons is pressed a new URL with some parameters to e.g. delete something from a database. The problem is that when the...
11
by: sudhaoncyberworld | last post by:
Hi all i am using asp.net v2.0 In one of my page i am calling another page using xml http , this is working fine but first time only , I am sending the request on click of button , when i...
7
by: Jean-David Beyer | last post by:
I have six hard drives (4 SCSI and 2 EIDE) on my main machine with parts of a database on each drive. The main index is on one SCSI drive all to itself. The main data are on the other three SCSI...
136
by: Merrill & Michele | last post by:
A derangement is a mapping of a set onto itself leaving no element fixed. I realized that that was what I was programming when I was asked to randomly determine who buys presents for whom this...
12
by: Mark Rae | last post by:
Hi, See the previous thread Request.Form abuse in this newsgroup... I'm looking for a simple and efficient way to prevent people hijacking the <formtags on my websites and using them to send...
1
by: Joe | last post by:
In ASP.NET 1.1 I could detected expired form authentication tickets (which closely coincide with my expired session) by checking for the Authentication Cookie when the login screen loads. If the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.