473,386 Members | 1,621 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,386 software developers and data experts.

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

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.

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


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
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 .....

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.
May 6 '07 #4
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 .....
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:
May 6 '07 #5

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

Similar topics

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...
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...
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...
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...
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...
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...
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...
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...
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...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.