LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-10-2014, 12:19 AM   #1
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 9.2
Posts: 1,140

Rep: Reputation: 50
How does a server serves html4 documents?


My question relates to links (to content held on the same server) in the document being served: are they sent (cached) to the client at the same time than the main document or are they only sent when the client clicks them (on the client machine after the main document has been rendered by the browser)?

If the latter applies, is there a way to send all so the client does not have to wait?

Any tip or suggestion most welcome.

Thank you for your help.
 
Old 07-10-2014, 12:41 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,757

Rep: Reputation: 1212Reputation: 1212Reputation: 1212Reputation: 1212Reputation: 1212Reputation: 1212Reputation: 1212Reputation: 1212Reputation: 1212
A html page (like the one your are currently reading) might contain countless links (<a href=..>) there is no reason to load their targets before the user clicks on one of the links.

Perhaps your problem is that your pages are too small, so the overhead is big? Instead of many little pages create a few big one (eg: this page is around 90KB, and it contains a complete essay.
 
1 members found this post helpful.
Old 07-10-2014, 12:45 AM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 8,783

Rep: Reputation: 3752Reputation: 3752Reputation: 3752Reputation: 3752Reputation: 3752Reputation: 3752Reputation: 3752Reputation: 3752Reputation: 3752Reputation: 3752Reputation: 3752
Quote:
Originally Posted by rblampain View Post
If the latter applies, is there a way to send all so the client does not have to wait
Oh god, no.
 
1 members found this post helpful.
Old 07-13-2014, 05:01 AM   #4
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,329

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Hello

It's called link prefetching.

http://en.wikipedia.org/wiki/Link_prefetching

It's usually not done with HTML, but with images. HTML is usually not that big by itself.

<link rel="prefetch" href="http://www.example.com/">

You can add link tags like this in the head section of the document. Do this for every link you want prefetched.

It has downsides though. I recomment you read the wikipedia article.
 
1 members found this post helpful.
Old 07-13-2014, 04:27 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175Reputation: 3175
Also... a browser may have several different requests in-progress to the same server at the same time. The "asynchronous" that is the first letter of AJAX actually grew out of this capability, which browsers have had for a very long time. Each individual conversation consists of a request and a response, but more than one conversation can be going on at the same time to the same browser, at that browser's behest. (Data can also be "pushed" by the server.)

And, for the most part, the server really doesn't care what "kind" of document it's serving. It simply identifies the type of data as part of the HTTP header that is sent, and trusts that the client knows what to do with it.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I run LFS on a Linux box which currently serves as router & samba server? iwonder Linux From Scratch 2 08-28-2009 01:43 AM
My server serves crooks... c0c0deuz Linux - Security 15 06-13-2005 06:48 AM
problems setting up apache and vsftp server behind a router that serves as a server xone Linux - Security 1 04-08-2004 10:46 AM
unable to view documents from my apache server wendallsan Linux - Software 2 09-27-2003 03:13 PM
Setup linux-apache server to access documents on NT server josephswagner Linux - Software 11 04-11-2003 08:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration