Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.