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

Javascript caching

83
Hi,

I have a link on an asp page. When i click the link i call some javascript which changes the appearance of the page using css style.display. If i then leave this page and then come back to it immediately the css style changes are not "saved".

I'm assuming this is because as far as the browser is concerned the cached version of the page has not changed so it just shows the original version again ?

Is there anyway to get js to update the cached page or pehaps this is simply not a good design...??

Thanks for any help.

Tim
Feb 27 '08 #1
1 961
acoder
16,027 Expert Mod 8TB
Any 'changes' you make that involve DHTML/DOM will not be 'saved'.

One way of retaining this information is to use cookies, so when a change is made, set the cookie. When you come back to the page, if the cookie exists, set the style.display accordingly, otherwise leave as the default.
Feb 28 '08 #2

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

Similar topics

2
by: Lawrence San | last post by:
I'm trying to test some simple JavaScript meant to speed up the display of my Web pages for readers using modems, but I have a fast DSL connection and I'm having trouble visualizing how effective...
6
by: KKramsch | last post by:
OK, here's the scenario: I have a CGI script that generates a page with frames (BTW, I'm not crazy about frames, but in this case the decision to use them is out of my hands). In a typical...
17
by: NeoAlchemy | last post by:
I am starting to find more web pages that are using a query parameters after the JavaScript file. Example can be found at www.opensourcefood.com. Within the source you'll see: <script...
2
by: mark4asp | last post by:
Can I force the client to stop caching old stylesheets and javascript? In my dynamic web-site, I need to force the client to stop caching old versions of my stylesheets and javascript. Can I do...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: 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
1
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...
0
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 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.