Is it really necessary to implement Gzip to my Html files if they are smaller that 16KB? - gzip

I am not sure if using gzip is really necessary, or will dramatically speed up my website if I implement it to my html files.
The file is quite small, so I am not sure if users will notice a difference if the webpage is served over gzip.
Thank You

The result depends on the actual contents of your HTML files. I recommend you to try it. Measure the overall page load time and amount of transferred bytes with your browser's developer tools to get evidence.

Related

Restrict file size using

I have to create a sub routine using VB.Net that compress some files into a "file.zip" file, but the problem is that this "file.zip" MUST have the maximum size of 2 MB.
I don't know how to do it, even if it's possible.
It would be nice if someone has some example to show me.
It is not possible to do this in the general case. For example if you have a 2GB movie file, no lossless compression algorithm will ever get it to 2MB.
One solution is to "chunk" your ZIP file. That is, divide it into parts that are individually no more than 2MB. 7-Zip has support for this. You can use their .NET API from VB.Net. I'm not sure whether the API provides direct support for chunking. If not, you can start 7-Zip from your program using Process.Start().

Are file extensions required to correctly serve web content?

We're using Amazon S3 to store and serve images, videos, etc. When uploading this content we also always set the correct content-type (image/jpeg, etc.).
My question is this: Is a file extension required (or recommended) with this sort of setup? In other words, will I potentially run into any problems by naming an image "example" versus "example.jpg"?
I haven't seen any issues with doing this in my tests, but wanted to make sure there are any exceptions that I may be missing.
Extensions are just a means by which OS decides the operating program. As far as your scenario is concerned, as long as the content-type specifies the type, the extension doesn't matter. But why in the world, would you name a jpg file as .txt right ?
Regards

Providing an embedded webkit with resources from memory

I'm working on an application that embeds WebKit (via the Gtk bindings). I'm trying to add support for viewing CHM documents (Microsoft's bundled HTML format).
HTML files in such documents have links to images, CSS etc. of the form "/blah.gif" or "/layout.css" and I need to catch these to provide the actual data. I understand how to hook into the "resource-request-starting" signal and one option would be to unpack parts of the document to temporary files and change the uri at this point to point at these files.
What I'd like to do, however, is provide WebKit with the relevant chunk of memory. As far as I can see, you can't do this by catching resource-request-starting, but maybe there's another way to hook in?
An alternative is to base64-encode the image into a data: URI. It's not exactly better than using a temporary file, but it may be simpler to code.

SEO - carve up one dynamic file with params into fixed-name files

So I've got an existing real estate site. All the searches go through one php file, ie: sales_search.php?city=boston&br=4
If I create the following files:
boston-1-br.php
boston.2-br.php
boston-3-br.php
boston-4-br.php
brookline-1-br.php
brookline-2-br.php
brookline-3-br.php
brookline-4-br.php
etc…
I would then use these in place of the sales_search?city=XXX&br=NNN wherever possible and only use sales_search.php for 'advanced' searches. These new files are still dynamic as they pull content from a database.
Would this help the rankings? Hurt them? Waste of time? Thoughts? Suggestions?
I don't think they'll help, or hurt rankings. The content on the page is far more important. What is the similarity of the content between these pages? When pages are named very similar to each other it can trigger a flag to make the spider look for doorway pages. If the content is varied enough you have little to worry about.
Have you considered using a url rewriter and turning them into .htm files? There have been a lot of arguments about it, but I have personally noticed .htm files do better than .php

Is there a good PDF to XHTML strict converter

It is basically all in the title, I need to take a bunch of large PDFs and have them in XHTML 1.0 strict, close is good enough, then I can clean it up.
Thanks
This is a complex request, because it depends on the PDF itself (and how it was created) whether this can be done or not.
As a first attempt, I would try to use adobe's own online PDF to HTML convertor
http://www.adobe.com/products/acrobat/access_onlinetools.html
and then try to fix up the HTML after the fact with something like tidy
http://tidy.sourceforge.net/
If the PDFs were creating by scanning images in then there may be no text associated with them at all - then the best you can do is either cut apart the pages and turn them into JPG documents, or use some sort of OCR software on the PDF itself.
I warn you that even if the PDFs were created by hand and thus have text information in them, there are likely to be a lot of mistakes in the conversion process that will have to be fixed by hand. I work on a product that basically does this process for corporate annual reports/etc and we ultimately settled on cutting up the pages into JPG/GIF images and HTMLing that - as the other processes we tried introduced too many error and it was too labor intensive to fix them all.