Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3612900
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:03:28+00:00 2026-05-18T22:03:28+00:00

This is a fairly crucial but overlooked functionality I guess in a web page

  • 0

This is a fairly crucial but overlooked functionality I guess in a web page – on a standard (non flex) web page, navigate away from the page and return to it via the back or forward button and it restores the scroll position you were at on the page previously. This is a crucial function and it would get very annoying if it wasn’t there – having a page automatically go back to the very top each time when you were previously scrolled way down on a long text site. I guess the browser itself must be managing this,as I was surprised to find that even deleting cookies, the cache and basically everything will not get rid of that saved scroll position.

So the problem is doing that on a flex web page – what is the correct way to do it. I have been using SHaredObject.getLocal, but was dumbfounded to discover that once a local shared object is created , it will NEVER be deleted, there is nothing a user can do in the browser to delete them (deleting cookies, etc has no effect.) So I had like 100 different sharedobjects in a Macromedia subdirectory storing nothing but scroll positions. Even with standard web pages you can delete browsing history, but with SharedObject they’re there for good unless you actually just delve into that file subdirectory and delete them manually (which of course a user would never do.) So a subquestion would be, is it really true that there is no way to delete SharedObjects from the browser. FLex even calls SharedObjects “Flash cookies” in their docs, but with real cookies the user can delete them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:03:28+00:00Added an answer on May 18, 2026 at 10:03 pm

    My solution is to have just one SharedObject for all URL’s generated, and this SHaredObject holds an object operating as a circular buffer. This object has properties indexed by URL, with each property pointing to the session info for that URL (e.g. scroll position, etc.). Haven’t tested the following yet, but this is what I’ve got. If there is already a built in way in Flex to do a circular buffer in a local SharedObject I haven’t found it.

    function createSessionInfo(url:String,info:Object):void {  
    
      var so_obj:SharedObject = null;
      try { 
        so_obj = SharedObject.getLocal("Session_Info","/");
      } catch (e:*) {}          
      if (!so_obj) return;
    
      if (so_obj.data.session == undefined)
        so_obj.data.session = new Object();
    
      var session:Object = so_obj.data.session;
    
      var date:Date = new Date();
      var max:int = 100;
      var first:String;
      var first_created:int=date.time;
      var cnt:int=0
      for (var p:String in session) {
        if (session[p].created < first_created) {
          first_created = session[p].created;  
          first = p;
        }
        if (++cnt == max) 
          delete session[first];
      }
    
      session[url] = new Object();
      session[url].created = date.time;
      session[url].info = info;
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a fairly trivial matter, but I'm curious to hear people's opinions on
This question may sound fairly elementary, but this is a debate I had with
I'm fairly new to C# but I will try to make this quick! ;)
I'm trying to use this fairly standard line of code in my app: [[UIApplication
This should be fairly simple, but it is turning out to be more complicated
It feels like this should be fairly simple but nothing i've tried so far
This is a fairly basic question, which for some reason, a proper solution escapes
This is a fairly involved bug, and I've tried looking around to find other
Okay this is a fairly broad question. This is my first App and I'm
While I understand this question is fairly vague since I'm not giving you all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.