My webpage syncs data from another site which can take a short while especially if the user's account has a lot of items in it. To speed things up I made it cache the data to my local DB and only update it every few minutes (the users can choose the interval in their account settings). This still leaves the problem that the refresh after that interval will be slow like before. I'd like a way to "silently" update the DB after the page has loaded, not as it loads which causes it to take a long time to load. One idea would be to put an invisible 1x1 pixel image that links to an ASP page that would run the update script and then redirect to a transparent image, but there must be a way of doing this without having to put an invisible image. What would be the proper way of doing this? Calling a blank javascript from an ASP file would probably be better (like <script src="updatedb.asp"></script>) but is there a better option? Thanks
Ajax. But I'd just stick to the image, that way non-javascript browsers it will still work.. why not just stick with the image?
Really? I thought that would be an unprofessional way of doing it. I've never used ajax but I want my site to work on even the most basic of browsers like on cell phones, so perhaps the image is better. Thanks
Unless anyone's willing to point out any disadvantages or reasons as to why it would be "unprofessional"? I couldn't see why... It's the most practical and efficient way to achieve the same result...