www.webdeveloper.com
Results 1 to 5 of 5

Thread: Getting visitor browsers to load most current page

  1. #1
    Join Date
    Apr 2011
    Posts
    2

    Question Getting visitor browsers to load most current page

    Hi,

    I'm new to writing HTML code and have 2 quick questions, both of which I'm guessing are pretty easy but again I'm new so please forgive me.

    I'm working on updating my employers web page, but i notice that once it is uploaded online that I have to make sure I refresh my browser to view the updated page. My concern is that if a returning customer goes to view the website and their browser loads the cached information that they will assume the page has not been updated and leave. Is there any code I can use to force a viewers browser to load the most current page?

    Second question is if I have a link, how can i specify that it open in a new window with a certain size. I know that <a href="url" target="_blank"></a> should open the link in another window but firefox and chrome keep opening tabs. and is there a way to specify the size of the window?

    Thanks,

    Chris

  2. #2
    Join Date
    Apr 2011
    Location
    I live in the pinaple under the sea
    Posts
    107
    You can use the javascript window.open method to load your new page in a separate window, something like this....

    window.open ("myPage.html","myNewWindow");

    myNewWindow is the instance name of your new pop-up window while the myPage is very descriptive obviously its the link..

    1 thing you should know is some other browser load the new window in a tab (not a pop-up) but if you want to make it pop-up try to put extra property on your new window, something like this

    window.open ("myPage.html","myNewWindow"","menubar=1,resizable=1,width=350,height=250");

    Okay hope it helps you...

  3. #3
    Join Date
    Apr 2011
    Posts
    2

    Thanks

    Thanks that helps with getting the link to open in a new window.

    Do you know of anyway to stop a returning visitors browser from loading the outdated page version that is cached in the browser?

  4. #4
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    You could try no cache method:
    http://www.codeave.com/html/code.asp?u_log=5080
    or...
    You might look into using a techique similar to that used to update news tickers. That is, require a time and date be appended onto the file name each time it is loaded... thus, never looking in the cache for the old version. Something like this:
    Code:
    xmlData.load("news_ticker.xml?blarg="+new Date().getTime());
    Perhaps you could adapt somthing like that to sections of the page that get frequent updates.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com

  5. #5
    Join Date
    May 2010
    Posts
    41
    I don't quite get what you're saying, but if visitors go to the webpage, it should be the newest version.

    hope I helped,

    Chris

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles