Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

468
Views
Agregar fecha a URL de redireccionamiento HTML usando Variable

Buscando agregar la fecha de ayer a una URL en una redirección meta html. El objetivo sería algo que funcione así.

 <meta http-equiv="Refresh" content="5; url=https://cse.google.com/cse?cx=xxx&q="news" after:%yesterdaydate%"/>

¿Sería esto posible con Javascript o HTML?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Muy simple.

Después de crear una Fecha, cree una cadena de fecha para la fecha de ayer.

Configure la etiqueta <meta> : la página redirigirá a esa URL.

NOTA: Sería prudente hacer esto creando la etiqueta <meta> mediante programación en lugar de usar innerHTML , pero esto funcionará para demostrar cómo se hace.

 const date = new Date(); const dateString = new Date(date.setDate(date.getDate()-1)).toLocaleDateString(); const meta = `<meta http-equiv="Refresh" content="5; url=https://cse.google.com/cse?cx=xxx&q=news after:${dateString}"/>`; document.querySelector('head').innerHTML += meta;
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!