Are you a Google Analytics enthusiast?
More SEO Content
Caching, Html, Php, & Speed
Posted 20 April 2011 - 08:35 PM
I'm pretty sure I'm just showing off my ignorance here, but...
This sounds ridiculous for a million reasons, but first my point is speed, then I'll mention the logistics:
Long story short, what if rather than uploading the php, grab the HTML that it outputs, and upload that instead (or deliver that from the server to users instead)?
How much of this does server side caching do?
And, do search engine spiders read cached websites? My point is, would there be any situation in which "building" the webpage with pure html as apposed to Php would help speed, whether minimal SEO, first user visit, or other?
There's a million little things that could create problems for usability, but if I were to create a function where Php reads a file, or most of it, (the outputted html from the original php webpage), writes a new one of predominantly HTML, and uploads/overwrites, or changes the appropriate permalink, with a lot of necessary details and customizations, I think it's a feasible feat.
However, I feel like there's another service or feature that essentially does just that, is there?
Posted 21 April 2011 - 06:33 AM
Posted 21 April 2011 - 05:34 PM
This forum page is an example of one that is dynamically created by a PHP script. It is created every single time someone comes in to read it even if nothing in the underlying database has changed. As efficient as the PHP engine has become in the past decade it still can't compete with a web server simply throwing text/html bytes out the door on request. On some level, it would make sense for the PHP script to create a static HTML page, write it to disk, and then send all the readers to that page. Any time someone added a new comment to the discussion, which happens a lot less frequently than reading, PHP would create a new page.
This isn't a new idea.
Remember the old UBB forum software, Jill? Everyone used it back in the mid- to late-Nineties, including the old JimWorld community. Servers were a lot less powerful back in those days and most of them couldn't handle a fully dynamic busy site. Ted, the guy who wrote UBB, solved that problem exactly as I've described above -- most of the pages were static pages. UBB was written in Perl, of course, not PHP, but the concept is still the same.
The cost, however, was high.
The first thing UBB's static pages gave up was interactivity. All the neat little things on this page that work because the software knows who you are when you're logged in immediately go away. The second thing abandoned, and this was the hidden gotcha, was scalability. Turns out there were always more instances than one might think when all those static HTML pages had to be recreated in bulk. The minute you have to sweep the entire database and rebuild the pages, you've lost all the efficiency benefits you gained, and every subsequent rebuild costs more and more. At some point, when the underlying database becomes too big, it becomes impossible to recreate all the static pages in anything approaching a timely manner.
So, yea, unless I'm reading the question wrong, it's possible and, indeed, it's been tried. It's just not practical.
Posted 27 April 2011 - 08:35 AM
If you create an html file saved with the output of a php script then your page will load faster. The amount will be based on the complexity of the php script and your server, but basically the server won't have to recreate the page each time. The downside is you will lose all the features that php gave to allow you to build dynamic pages. If you were creating static web pages using php in the first place then it might make sense to just save the page in html.
If your using a CMS program, what some do (such as MediaWiki and WordPress) is that it can be configured to automatically generate static files and serve to most users (which makes these users get their pages faster) but also to serve the dynamic (and slower) pages when needed (such as when a user is logged in). When the content changes, the static files are automatically regenerated.
While the search engines don't care if a page is served as an .html, or .php file, the search engines are assessed to take speed into consideration. Serving faster static pages may be beneficial not only for your end users but also for SEO.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users