Clearing Cache
Is there a way to clear cache using ASP, VBScript or Javascript?
I have created an ASP login page with sessions etc so unregistered members cannot view certain pages, however, when you logout you can still press the back button on the browser toolbar and view the pages, I want to find a way to make those pages expire by clearing the cache or something like that!
View Replies
ADVERTISEMENT
Does anyone know how to clear a sites cache with ASP. I have a login script that does not terminate the history when signing out. A user can simply click the back button and get back into the site..
View Replies
View Related
I have a page that creates a cookie on your computer. at that point it stores login information. Seeing that I am on the administration side and wish to login to accounts without the cookie getting in the way, I create a page to delete the cookie as follows:
Response.Buffer = True
Dim Cookie
For Each Cookie In Response.Cookies
Response.Cookies(Cookie) = "this must be something!"
Response.Cookies(Cookie).Expires = Date() - 1
session.clear
session.Abandon()
Next ' Cookie
For Each Cookie In Response.Cookies
Response.Cookies(Cookie) = "this must be something!"
Response.Cookies(Cookie).Domain = "hazsoft.com"
Response.Cookies(Cookie).Expires = Date() - 1
session.clear
session.Abandon()
Next
This removes the cookie like i desire but, I must first reopen my browser for the cookie to be totally removed. As you can see I have also removed the session variables. Is there a way to remove cookies and session variables, without having to close the browser window?
View Replies
View Related
The code below isn't clearing the cookie and sessions. It is used in my shopping cart to track the user and the items purchased/added to the cart. After making a purchase you are directed to the receipt page (where this code is). If you go back to the main site the items still show in the cart. Any thoughts?
' The below lines clears out the users cookies to allow for additional orders
Response.Cookies("customerid") = ""
(this part seems to work... when clicking refresh the proper error message is displayed etc.)
' The below lines clear session values to avoid duplicate ordering using Refresh
session("cust") = 0
session("cartID") = 0
View Replies
View Related
I have a form with 4 different Submit buttons. In the action code, I do a
request on the button names to see which one is valued. This all works
great, until the browser is refreshed -- the request shows the name of the
last button pressed. Is there a way to clear all the buttons so they don't
appear to have been pressed when they've only been refreshed?
View Replies
View Related
Im useing Access, and trying to clear the table before i write to it, and to be able to keep it all on one page? Trunicate table or something like that? This is waht I have so far but doesnt work. Code:
View Replies
View Related
I assume it has to do with cache control, but how do I prevent the form from clearing when a user hits the back button? The form I am referring to is my registration page. After the registration is submitted, they are taken to an error handling page. If an error comes up, they are required to hit the back button and correct the mistake.
It seems like for the most part it retains all of the information in the fields, but occasionally it clears it out. How can I prevent this?
View Replies
View Related
How do I clear the data in this field before using the date function.?
<input type="text" size=35 name="DepartCentralDate" value="<%=x_DepartCentral %><%= FormatDateTime(Date, 1) %> <%= FormatDateTime(Now, 3)%>">
View Replies
View Related
How can you clear session variables when a reset button is pressed? I thought I might be able to do something like:
<%
If request.form("Reset") = "Reset" then
Session("variable") = Null
%>
Is this correct, it isn't working right so is there a better way?
View Replies
View Related
was there anyway to clear the data submitted by a form? What i need to do is once the page refreshes, clear the sent data?
View Replies
View Related
I searched the forum and got the following code from someone who posted it in 2002. However I can't seem to get it to work in my asp page. Can someone confirm the syntax for me? I would like to try and put it in an include file rather, but need to get it to work first.
Response.ExpiresAbsolute = #1/1/1980#
Response.AddHeader "cache-control", "no-store, must-revalidate, private"
Response.AddHeader "Pragma", "no-cache"
Response.Buffer = True
Regards
Ronel
View Replies
View Related
I have a form that comes up pre-filled with database results for the values. I'd like to add a button, though, that will clear all fields to start blank if desired.
A standard "reset" button, will only clear input that has been typed in, but won't clear the initial values. Does anyone have a script already that does this or could someone get me started on how I could do this?
View Replies
View Related
I am trying to run and UPDATE, INSERT and DELETE SQL statements to update append and delete data from some tables in access. Here is the low down:
I want to update All of the fields from a table called TEMP into a table called POSTPONED, WHERE the 'postponed' fields = "False"
I want to then go on and clear the records from TEMP that have the field postponed = "false"
And finally i want to again append the remaining data in the TEMP folder into a table called RESULTS.
Does any one know how to do this or what the SQL statements should look like, i have tried writting them, no luck, i have tried generating them in Access but no luck because the ASP is erroring me on them and i dont know what its chatting about!
View Replies
View Related
I have a form that on clicking of the Update button first updates
the specific record in the db, then Inserts if the vMemo field is not
empty. The problem that I'm having is that After updating if you hit
the [F5] key (refresh) it inserts another record ...
I have tried:
1. Clearing the vMemo field after the insert is done (vMemo = "")
2. Setting the value on the form for this field to ""
Neither of these are working. It's not displaying it on the screen
but it is holding it in memory (I guess). Any way to clear this out
after update/insert?
View Replies
View Related
I'm just dipping my toes into server-side scripting.
The Global.asa file seemed really nice, but am I understanding correctly that the application onstart event is fired ONLY when the server is started/re-started or when the FIRST user logs onto an ASP application?
If that's the case, then all the changes I keep making to my Global.asa file are pretty useless, right? (which seems to be the case -- i.e., my pages are not using any of the new information). Code:
View Replies
View Related
I'm building a page that displays all phone in phoneview.asp...however from admin section we can add new phone image tht stores path in database.
I wanna use cache object in phoneview.asp..becoz most of the time images r same..
so i just need to store image in cache...but not data..becoz asp page reads all phone list information from database and displays all phones.
so is it possible to store image in cache so it can be served quickly if its in list
View Replies
View Related
Could someone tell me the way(s) of doing cache in old ASP pages?
What i really wanted was to keep in cache for some time the HTML generated by an ASP page (something like the "@OutputCache" directive of .NET).
View Replies
View Related
I have an ASP page with the "no cache" command.I know the ASP file is not being cached. But the flash file that is embedded in the ASP page is repeatedly cached by my browser.
Anyone discover a sure-fire method to prevent caching of embedded files?
View Replies
View Related
In my asp code i generate a graph/plot which is saved as a .png file, so saved as an image to the server. The problem is when i revisit the page with different selections, a new image is generated but not shown in the HTML. The previous image is shown which is not desired. So i did some coding to not cache the image, but without succes. Here is some code i tried:
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","no-cache,must-revalidate"
Response.CacheControl = "no-cache"
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
</head>
</html>
and i used "nosave" in the img tag
<td><img src="linegraph.png" width="<%=xsizewindow%>" height="400" usemap="#map1" border="0" nosave></td>
but all these options without succes......
View Replies
View Related
i need to change a variable in my application object in every 5 minutes. Application("test"). how can i do that? can you show me an example code.
View Replies
View Related
I have a frameset with 2 different pages. When a user logs in the page is setup based on that particular user. The problem I have comes when that user logs off (killing his/her session) and someone else logs in one of the fr4ames does not always refresh with the new users info.
The user actually has to right click on it and click on refresh. I am killing session with �Session.Abandon� (this seems to be working). I have the following statements at the top of the page that is not refreshing: Code:
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
Anyone have any idea why the frame is not updating?
View Replies
View Related
My website is on a server that places Cache-Control: private in the
Header of the pages that are served. I see these pages are not cached
by Google (the Google Toolbar Cached Snapshop of Page function).
Is this directive from my server preventing Google from caching the
pages that have it or do I need to look into some other problem?
Thanks in advance for your input/feedback.
View Replies
View Related
how you 'cache' an ASP page? I run a football predictions league site and some pages than calculate users points stats and the league table are taking ages to load. I think this is because its making loads of calculations (Although I could be wrong!).
Ive been told the best way to solve this problem is to run the ASP page once and then 'cache' it. The page only needs to be run once to perform the calculations so I shouldnt be making it run the calculations on every request, as happens at the moment.
View Replies
View Related
what is the diference between these two cache control header.no-cache and no-store.I have read the w3.org explanation.So lets say I am using only no-cache ....my understanding is thatnothing is cached and nothing is writen to disk.but what happens when we use no-store....i think..nothing is written to disk but it could be cached.
Now my question where is this cache located...is it only in memory ?....if it is written to disk how log is it there and when does it gets cleaned.Is no-cache more secure than no-store ..why?
View Replies
View Related
how you 'cache' an ASP page? I run a football predictions league site and some pages than calculate users points stats and the league table are taking ages to load. I think this is because its making loads of calculations (Although I could be wrong!).
Ive been told the best way to solve this problem is to run the ASP page once and then 'cache' it. The page only needs to be run once to perform the calculations so I shouldnt be making it run the calculations on every request, as happens at the moment.
View Replies
View Related
I wrote the following code to clear the cache in my asp page.
Code:
Response.Expires=-1
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Cache is getting cleared but a new page is coming when i hit the browser's back button. I need to get the page expired warning message of internet explorer. I did some r&d and found that HTTP_CACHE_CONTROL: no-cache header is not getting added to the page. How to add this header to my web page.
View Replies
View Related
Is there any way I can clean the cache at the top of each web page so that users cant use the back button in explorer ?
View Replies
View Related
I have an ASP which performs a simple query pulling data from an Access db. The data will only change about once a month so I reckon it'd be more efficient to cache the recordset in some way. I'm guessing I store it in an application variable but I don't know where to start.
View Replies
View Related
Just pass date as a querystring , even if you do not want it
like www.domain.com?x=date
No browser will ever cache this page because the url will change every second LOL. This comes particularly handy when you are making remote calls using xmlhttp or other means and you require the results to be current.
View Replies
View Related
how you 'cache' an ASP page? I run a football predictions league site and some pages than calculate users points stats and the league table are taking ages to load. I think this is because its making loads of calculations.
I ve been told the best way to solve this problem is to run the ASP page once and then 'cache' it. The page only needs to be run once to perform the calculations so I shouldnt be making it run the calculations on every request, as happens at the moment.
http://www.pool-predictions.co.uk/ho...rs.asp?tab=a_d
View Replies
View Related
1: Is it possible to cache the images on my pages.....eg...credit card images, header images, logo etc etc, so that thge user doesn't have to keep loading them from scratch on every page?
2: How would i go about doing that?
I only want the images to be cached...not the content, as it involves sessions which store login info.
View Replies
View Related
how can control cache pages, when i logoff my session and back to members page again the page is still so how can i get rid of this .
View Replies
View Related
Someone know how can i delete cache of browser in asp code? is posible?
View Replies
View Related