Showing posts with label Browser. Show all posts
Showing posts with label Browser. Show all posts

Friday, August 15, 2014

Can we make web apps less reliant on network?

So I was thinking a little about how I was using bootstrap for some of my sites, and with it being a pretty commonly used code across sites it got me thinking.

Could we somehow share these resources across domains reducing the need to download, which causes us to slow things down normally.

Here is my thought.

When parsing a .html file you come across a script tag with a src a la

script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.6/angular.min.js"

When it downloads the file it (maybe?) puts it in memory so it can be used (I could be wrong here).

What I was thinking is that we maybe generate a key value store, and it does something like this:

{"https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.6/angular.min.js", "pointer to memory that this resides"}

Now instead of simply downloading a .js file, it looks at the lookup (or hash table) and finds that that EXACT path file exists in memory and just uses that instead of downloading the file again.

Caveats.

1. I don't know if it would be possible to modify that memory.
2. I wouldn't expect this caching to be indefinite, but should be do-able across pages during an active session.

As long as the downloaded data isn't capable of being modified in memory, then doing a string lookup in a local hash *should* give us a decent startup decrease because we don't need to re-download the file(s) and I can't see how we would have any problems with safety/security since you're literally using the exact same file as you downloaded earlier, you just don't need to re-download.

I'm sure I'm missing something here, but I would think that this should be possible. Got any ideas? hit me up on twitter (@onaclov2000) or leave a comment here

Thursday, July 9, 2009

Browsing History

Sometimes I'll navigate through a search, and a couple pages then jump to another search. In the meantime I've found a couple good sites along the way, there may have been more sites I liked but once I've closed my browser I've lost my timeline.

I think that we need to update the back-forward system to a timeline type system, and keep that data embedded within a bookmark. For example, I bookmark something in January thinking that it has some use. June I go back to use that bookmark, and the link is dead for example, I do some light searching but can't seem to find similar subjects. If my bookmark had a history associated with the item then, I can go back and forth, now of course it's possible that some of the "in between" sites are dead now, but I should be able to "recreate" the process that lead me to this particular site, and now I might be able to find the "new" site, or find a completely different site that contains the same type of information that I've managed to find in the past.

How we can do this:
Keep a rolling history list, when pages branch you just branch, kinda like a tree data structure, when you bookmark that particular page, you embed a document with the bookmarks that has a 1 to 1 correlation to an individual bookmarked item, then when you want to see how you got to that page, there is a simple parser that could just bring up a flow chart that contains a screenshot along with link of each page that got you to that page.

I honestly don't see how that could possibly be that hard.

Let me know what you think about bookmarks, how they are used how they should be used, if bookmarks SHOULD even exist anymore.

My opinion is if you feel that a site was worthy of a bookmark it should be worthy of knowing how you found it.

Let me know what you think!!!