Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link to a new page loaded from server (not cache)

Status
Not open for further replies.

decomplexity

IS-IT--Management
Dec 4, 2007
8
0
0
GB
I need to link from one page to another – either with an <a> href anchor or a window.location or similar – such that the second page is always checked first to see if has changed (and if so reloaded from the server) or, failing that, always reloaded.

location.reload(false) will check first before reloading; location.reload(true) will always bypass the cache and reload from the server. But both operate on the page in the current window.

Is there pls some variant which will do this as part of the linking process? I don’t want to link to a page and then have that page immediately reload itself.
 
Thanks Greg.
My understanding was that the Location object (or the Location property of the Window object – which amounts to the same thing) had the snag that one could either:

- write to the Location’s href property, which caused a new page to be loaded and displayed
or
- use Location’s reload() method to cause the cache to be bypassed or at least checked whether it has an up-to-date page, depending on whether reload was given a ‘true’ or ‘false’ argument)

but not both at the same time

I didn’t appreciate that there was a difference between linking to a new page and to a new frame; either that I could transfer control to a new frame or that the new frame could refresh itself with a reload(), but not both in one command. The parent page should, I guess, be able to access the frame’s URL and/or issue a reload(), providing the same-origin policy is not broken (i.e. the server for parent and frame is the same), but this would not appear to solve my problem.
Perhaps you could elaborate.
Tnx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top