473,657 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to set URL and force refresh?

Hi all,

I have a page where I set document.locati on.href
but the previous copy of that page is in the cache,
so Firefox is not refreshing its contents, which is
what I want it to do. Is there a way to get this
result?

Thanks.

Jun 2 '07 #1
2 10281
I have a page where I set document.locati on.href
but the previous copy of that page is in the cache,
so Firefox is not refreshing its contents, which is
what I want it to do. Is there a way to get this
result?
try :

dummyDate = new Date() ;
dummyParameter = "?" + dummyDate.getTi me()
self.location.h ref = "myPage.htm l" + "?" + dummyParameter

Bye.
--
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html
Jun 2 '07 #2
Real Gagnon wrote on 02 jun 2007 in comp.lang.javas cript:
dummyDate = new Date() ;
dummyParameter = "?" + dummyDate.getTi me()
self.location.h ref = "myPage.htm l" + "?" + dummyParameter
That would result in ...??...

=============== =============== ==

Even simpler, just add the numeric date value:

location.href = "myPage.htm l" + "?" + +(new Date())

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jun 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2287
by: Charles Soto | last post by:
I've got a main loop script that calls two other scripts that do no user interaction. All they do is send a couple of mysql update statements. Then they use header() to call the main loop again. This works fine, EXCEPT the mysql statement isn't finished by the time the main loop is called. This is a problem because the main loop actually queries that same table to show the value of the rows you just changed. If I refresh the page...
2
5469
by: thenetflyer | last post by:
<!-- The following sample should authorize the user to log on the site. This works once but after refreshing the browser, it does not prompt again for login until all browser (IE 6) windows are closed and the same page is opened. I turned off all caching but still it does cache (as a refresh doen not promt again). How can I force the page to prompt for a password at every refresh ?
19
36535
by: Jay | last post by:
I'm trying to refresh browser when some new information is available in DB. is there any way to force to refresh browser? Thanks. -Kev
17
1831
by: Geoff Cox | last post by:
Hello, Can I use JavaScript to force a maximised window ? Thanks
1
10853
by: Marco Maroni | last post by:
How to force image refresh on client browser ? Is ti possible to force the refresh of the same image (tha was changed server-side) to the client, without user press Contrl+F5 in IE ? - Marco
10
23410
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application and I need to find a way to cause a page refresh from within my application. Does anyone know how to force the browser to refresh the current page? Thanks very much for your help! Fred
22
5027
by: Br | last post by:
First issue: When using ADPs you no longer have the ability to issue a me.refresh to save the current record on a form (the me.refresh does a requery in an ADP). We usually do this before calling up another form or report that uses some of the same data. We came up with a work around that saves the current record's ID, does a
0
2274
by: philaphan80 | last post by:
Is there a way to force the Visual Studio IDE (Page Control at design- time) to refresh / repaint itself upon drag & drop of *any* item from the toolbox? Perhaps a method I need to override within the page control? I'm aware of using "ComponentModel.RefreshProperties(RefreshProperties.All)" within custom controls, but that only refreshes the page when something specific to that custom control is changed. I'm looking for a way to hook...
0
3944
by: Summercool | last post by:
right now i have a script that will add to the DOM tree of a form... adding the hidden input values as children... it works well except when i click "BACK", Firefox doesn't remove those objects... (IE 7 and Safari 3 both removed them). So Firefox will actually submit more objects that there really are. so Firefox (2.0.0.8) is the only one causing trouble... is there a way to "force" refresh of the page or reload it? if i refresh...
2
2189
by: Hrvoje Vrbanc | last post by:
Hello! I have an ASP.NET page that displays some data from an SQL Server 2005 database, using a Select query. The database is updated by another piece of software, independently of the ASP.NET page. The ASP.NET page only displays data and it has nothing to do with inserting or updating data. What is the best way to force the refresh of the ASP.NET page every time a new record is inserted in the table?
0
8402
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.