Results 1 to 5 of 5

Thread: Page automatically to get image changes from server

  1. #1
    Join Date
    Nov 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Page automatically to get image changes from server

    I want the the page on the site to reflect the latest images pushed on to the server. What can be done to achieve that.
    Tried a couple of options.
    1)Calling reload on load goes to an infinte loop.
    2)Browser picks the images with latest timestamp. But it works sometimes and doesn't sometimes.

    any suggestion .
    Thanks in advance.
    Rads

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    How about having the page reload say, every 2 minutes or something?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    But I think that would create un necessary network traffic. Sending requests when not required.Isn't it

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, there is no real way to tell, using only javascript, when the page might need to be updated. So, it then becomes a problem in logic. How often would one need to check (reload) to be reasonably sure no critical information was missed? How many image tags are involved? Also, if the image(s) were in (an) iframe(s), only the iframe(s) would have to be refreshed. What I am getting at here is, cutting down to a minimum any bandwidth that would be required. There are probably ways to do this with greater precision, using a server side language but, that is beyond both my current knowledge and the scope of this (the javascript) particular forum. You might ask in PHP or another server side forum here and/or at other online help forums.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    AJAX would work. I'll work on it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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