Mobile app version of vmapp.org
Login or Join
Jessie594

: Reducing the number of iNodes used by .html pages I don't know if i'm in the right section of the stackexchange here, but it seemed to me to be a good place to ask my question. I have

@Jessie594

Posted in: #WebHosting

I don't know if i'm in the right section of the stackexchange here, but it seemed to me to be a good place to ask my question.

I have a "website" which is based about developing Autodesk Inventor applications. To properly discuss and reference the subject I have the Autodesk Inventor API .chm file decompiled to .html pages. To these pages I create links so others can see what objects/methods are used..

My problem now is, as my website is still small and low low budget, decompoling the .chm file to .html files has left me with 22.806 files and my iNodesor files limit is only 20.000. What can I do to reduce the number of files? is there a way compile them into a more compact file?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie594

1 Comments

Sorted by latest first Latest Oldest Best

 

@Angela700

Combine the HTML pages

Instead of running hundreds of individual HTML pages, you can instead run one PHP page that serves multiple HTML pages which would be good if you want to serve guests with very old browsers, or you could use javascript if the functionality of each page is basic enough.

In PHP you can use this code to start:

<?php
$wantedpage=$_GET['Page'];
if ($wantedpage=="toys"){
?>
Welcome to the page about baby cribs and other toys.
<?php
}
if ($wantedpage=="cats"){
?>
Welcome to the page about kitty cats
<?php
}
if ($wantedpage=="cars"){
?>
Welcome to the page about race cars
<?php
}
?>


Then a guest can call your PHP file up and add a ?page=x to the end of the URL where x is the page wanted. In my example, if x is "cars" then "Welcome to the page about race cars" will be displayed on my screen. So far, my file will save you from creating three individual html pages.

In Javascript, you can do this:

<script>
function processbox(){
document.getElementById('box').innerHTML="You clicked the box";
}
</script>
<p>Click on the box to continue.</p>
<div ID="box" onclick="processbox();" style="border: 3px solid black;width:200px;height:200px">
click me
</div>


I haven't tested the javascript but when you click the box, "click me" will change to "You clicked the box" without requesting another page load, thereby saving you one file.

It really all depends on your audience, but learning a server-side programming language and using it to produce the appropriate text based on the parameters the user passes in is the best way to go.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme