So, I’ve noticed I’m reusing the same base HTML code for every page I have, and only changing the HTML in the main container.
To stop this + make my website way easier to change throughout all the webpages, I will be using the jQuery load function to load the HTML/content into the main container.
(If you have any better suggestions on how to implement this, let me know)
I think this is a decent solution, however it is very unpleasant to have my site use ?p=test-page rather than /test-page/
Is it possible to do this? As well as for things that are in other directories e.g. /other/some-page/
I guess you’re doing it because you have too many requests
and some of your websites are suspended
basically you want to have a dynamic page
base is up and new content down
the server needs to give a crawler an HTML snapshot - but I think you need to
have control over the server
as far as url is concerned
htaccess and URL Rewrite do the work
possible problems with ?i=1 (security) and your RW URL’s
My requests are fine, I just feel bad always copy and pasting the exact same HTML for every page.
This is an example of what I want:
<div id="mainContent" class="container">
<!-- My custom HTML here -->
Alternatively, I was thinking of making myself a parser that will put the custom HTML into the template. This might make my site load faster, and make SEO not a problem, just I’ll have to reupload every HTML page every time I change the template.
<!-- USE template.html -->
<!-- HEAD -->
<!-- MAIN -->
<h1>My main content here</h1>
Another method which works a lot nicer is to use PHP to include common components. That way, the includes are invisible for your visitors while still making it easy for you to combine shared components.