Jump to content

initial load of content


felito

Recommended Posts

for example i have this file in all files

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>

 

my idea is just load the file in the first page, index.php and avoid the load in the other pages.

 

But i seen in the firebug and the file is only loaded in the first php. The others subpages using the same file in cache.

 

So, my problem don't make sense.

On the second page though you're making a new request, a brand new 'document' in the eyes of the web browser. You need to tell the browser what resources are needed in this document, so that it can include them. Caching is handled separately from that, and prevents the browser having to re-download the resources each time. While you might see benefits to preserving resources without having to explicitly include them on subsequent pages, you don't need every resource on every page and you it would make maintaining/removing them a nightmare. It's easier to say what is needed than what's not, and obviously makes more sense to do it that way.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.